4xy
4xy

Reputation: 3662

Why is the nested object tag necessary when embedding flash to HTML?

Could anyone tell me why is this necessary to designate second nested object tag?

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="movie_name" align="middle">
    <param name="movie" value="movie_name.swf"/>
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="movie_name.swf" width="550" height="400">
        <param name="movie" value="movie_name.swf"/>
    <!--<![endif]-->
        <a href="http://www.adobe.com/go/getflash">
            <img src="path/to/get_flash_player.gif" alt="Get Adobe Flash player"/>
        </a>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
</object>

When I use swfobject to embed the flash content it only creates one object tag.

Upvotes: 0

Views: 917

Answers (1)

Quentin
Quentin

Reputation: 943099

Because Internet Explorer.

The first version loads an ActiveX control version of the Flash Plugin. The nested one uses the standard HTML for it.

When I use swfobject to embed the flash content it only creates one object tag

It probably uses browser sniffing to determine which style of object to create.

Upvotes: 1

Related Questions