3

How To Embed SWF In HTML?

4 Answers 4

7

The non-official industry standard is to use SWFObject

 <script type="text/javascript">
    swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
 </script>

Documentation

Sign up to request clarification or add additional context in comments.

1 Comment

If you using .net and putting an swf into a master.page, use this: <script type="text/javascript"> swfobject.embedSWF("<%= this.ResolveUrl("~/live.swf") %>", "headerFlash", "924", "200", "9.0.0"); </script>
3

Use SWFObject as apphacker mentiond. Just in case you cannot use it (to support browsers with JS disabled), here is how to do it with HTML alone.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        id="myMovie" width="300" height="200"
        codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    <param name="movie" value="Movie.swf"/>
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <param name="allowScriptAccess" value="sameDomain" />
    <embed src="Movie.swf" quality="high" bgcolor="#ffffff"
        width="300" height="200" name="myMovie" align="middle" 
        play="true"
        loop="false"
        quality="high"
        allowScriptAccess="sameDomain"
        type="application/x-shockwave-flash"
        pluginspage="http://www.adobe.com/go/getflashplayer">
    </embed>
</object>

Comments

1

Is this what you want to know?

Comments

0
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

WIDTH="850"

HEIGHT="610"

CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">

<PARAM NAME="MOVIE" VALUE="2bigpinkballs2.swf">

<PARAM NAME="PLAY" VALUE="true">

<PARAM NAME="LOOP" VALUE="true">

<PARAM NAME="QUALITY" VALUE="high">

<PARAM NAME="SCALE" value="noborder">

<EMBED SRC="2bigpinkballs2.swf"    WIDTH="850"    HEIGHT="610" PLAY="true" LOOP="true"             QUALITY="high" 

scale="noborder"

PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED></OBJECT>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.