Flash functionality

How to create Flash movies

In this section we will show you how to create a simple flash animation with Swish, an easier and powerful Flash tool. We will include an external image, make it move on a defined path and change its size during the length of the movie.

A detailed video tutorial on how to create the Flash animation is published below.

The SiteGround.com video content presented here requires a more recent version of the Adobe Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Open the Flash movie which you have recorded in the previous section. Its extension is .fla. Click on File ->Export>Export Movie.

Export Movie

In this way you will export the .fla file as a .swf file.

Now you can embed the movie in your HTML web site.

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

<object width="550" height="400">
<param name="movie" value="my_animation.swf">
<embed src="my_animation.swf" width="550" height="400">
</embed>
</object>
 

NB: This is the minimum code you need to embed a Flash movie in a browser. A broken icon will appear on the Web page if the user does not have the Flash plug-in installed.

NB: 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 on Windows and Netscape Navigator (Macintosh and Windows) and Internet Explorer (Macintosh) recognizes the <embed> tag and ignores the <object> tag.

Type in the address of the HTML file in your browser and look at your first Flash movie.

Alternatively, you can allow Flash to do all the work for you.

 The code above is the absolute minimum code to embed Flash movies in HTML pages. It is not recommended to use the minimum code. There should be a few more attributes added:

    * classid is an attribute to the <object> tag. It tells Internet Explorer from where to download the ActiveX plug-in if it is not installed.
    * pluginspage is an attribute to the <embed> tag. It displays a link to the Shockwave download page if the browser does not have it.

The Flash program can add these attributes for you. Choose File->Publish.

Publish

Flash will create the <object>, <param>, and <embed> tags for you. It will also create the classid and pluginspage attributes. Open the HTML document that Flash has created, view the HTML source and copy the code into your HTML page where you want your Flash movie.

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="550" height="400" id="My Documents/my_animation" align="center">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="../My Documents/my_animation.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="../my documents/my_animation.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="My Documents/my_animation" align="center" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>

Be sure that you have the "my_animation.swf" file in the correct location. Type in the address of the HTML file in your browser and check your Flash movie.

When embedding Flash movies in HTML there are many tags and scripts that influence its performance. By changing the code of these tags and scripts we can set the flash movie size, transparency and many others appearance features.

Many of these features are available at File->Publish Settings->HTML.

Every change of the settings in this menu add or remove some certain source code to your HTML file. You can manually edit or copy it to another file through your favorite text editor.

Publish Settings

With the Detect Flash Version option you may set requirements about the visitor`s version of Flash Player. Any player under the required version will not be able to preview your flash movie. Instead the visitor will be redirected to certain page where an update could be downloaded.

From the Dimensions section you can set the size of your Flash Movie by giving a certain width and height values in percents or pixels.

The Playback section allows you to make a loop of your flash movie or forbid the right click menu.

Next you can change the movie Quality, the Window Mode, alter the HTML alignment and the Scale.

You can set the Alignment of the Flash movie on your web site by selecting the horizontal and the vertical alignment.

Click on the Publish button to generate the .html file with the embedded flash code.

SiteGround package does not support Flash server. Flash is a trademark of Adobe Systems Inc. SiteGround is not affiliated with or endorsed by the Flash Project or its trademark owners.