This website may use cookies. More info. That's Fine x
Welcome Login

Embed flash to html


Html

Syntax:

<object width="100" height="100">
<param name="movie" value="file.swf">
<embed src="file.swf" width="100" height="100">
</embed>
</object>

 

 

Eg: replace 'file.swf' with your swf file

<object width="100" height="100">
<param name="movie" value="/Images/loading.swf">
<embed src="/Images/loading.swf" width="100" height="100">
</embed>
</object>

 

// outputs:

html-flash1

 

 

Embedding flash movies:

Following html code will make a 300 by 400 pixel movie frame called sample.swf on the screen. It will play in best quality and repeat once it has completed playing.

<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
WIDTH="400" HEIGHT="300"
CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="MOVIE" VALUE="sample.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="QUALITY" VALUE="best">
<PARAM NAME="LOOP" VALUE="true">
<EMBED SRC="sample.swf" WIDTH="400" HEIGHT="300" PLAY="true" LOOP="true" QUALITY="best"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>

 

 

For more information, see here.

To custom build an object tag for your swf file, see here.

For fix swf file issues in Asp.net, see here.


Created on: Tuesday, March 20, 2012 by Andrew Sin