HomeAfter Sale Support Working with HTML Advanced How to embed flash intro in HTML

How to embed flash intro in HTML


There are several methods of embedding Flash elements into HTML pages.

1st method:


To embed the Flash intro that you just edited into an HTML page, you should go back to your Flash program and do the following steps:

Step 1
Choose "File > Open". Open the Flash intro you have modified.

Step 2
Choose "File > Export Movie" or press "CTRL + SHIFT + ALT + s"

Step 3
Name the file "intro.swf". Choose the location where the file is to be stored (in your HTML folder). Click "OK".

Step 4
Open the HTML page where you want to insert your Flash movie. Insert this code:


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700"
height="322">
<param name="movie" value="intro.swf">
<param name="quality" value="high">
<embed src="intro.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700"
height="322"></embed>
</object>

In the code above there is both an <embed> tag and an <object> tag. This is because the <object> tag is recognized by Internet Explorer, and Mozilla recognizes the <embed> tag and ignores the <object> tag. There are a few more attributes used: classID is an attribute to the <object> tag. It tells Internet Explorer to load the ActiveX plug-in if it is not installed. The plug-ins page is an attribute to the <embed> tag. It displays a link to the Shockwave download page if Netscape does not have it. A broken icon will appear on the Web page if the user does not have the Flash plug-in installed.

Step 5
Save the HTML file and run it in a browser window to preview the flash intro.

2 method:

The Flash program can generate both SWF movie and HTML page adding all the necessary attributes into the code for a flash intro:

Step 1
Choose "File > Open". Open the Flash intro you have modified.

Step 2
Choose "File > Publish" or press "shift+F12". Flash will now create the <object>, <param>, and
Choose "File > embed tags for you". It will also create the classID and plug-ins page attributes.

Step 3
Open the HTML document that Flash created in a browser window to preview the flash intro.