fallback image for flash object

tobros91 picture tobros91 · Apr 27, 2011 · Viewed 7.5k times · Source

If i want a image to show if this flash cannot be loaded how do i do that?

<object width="574" height="143">
<param name="movie" value="/upload/attachments/1391/139130/iphone_banner.swf">
<embed src="/upload/attachments/1391/139130/iphone_banner.swf" width="574" height="143">
</embed>
</object>

Answer

Kevin picture Kevin · Apr 27, 2011

You could wrap the object tag in a div and apply a background-image to the div.

CSS:

.wrapper
{
    background: url(path/to/image.png);
}

HTML:

<div class="wrapper">
    <object..
</div>