4

I'd like to embed an SWF file in HTML5. It works fine with this code:

<embed src="main.swf" width="550" height="400" />

But how could I show alternative content (an animated GIF image, or a static JPEG or PNG) just in cases which swf file is not supported (and still validating in w3! ;) )

Thank you!

nhubbard
  • 110
  • 2
  • 11
Gaby
  • 85
  • 1
  • 3
  • 9

1 Answers1

6

Use the object tag instead of the embed tag like so: <object width="550" height="400" data="main.swf">Alertnative Content Here</object>

See: EMBED vs. OBJECT

Community
  • 1
  • 1
Treker
  • 386
  • 2
  • 9
  • 1
    Thank YOU!!! It worked perfectly. I've just had to use for pass the flashvars values and use data instead of src. It works perfectly! THANK YOU!!! – Gaby Aug 25 '14 at 19:17