Flash is a multimedia platform used for creating interactive and animated Web sites. It is widely used in the animation of text, drawings, and still images. Dealing with flash requires understanding of HTML and the basics of building Web pages. Flash utilizes vector graphics, which means that the graphics can be scaled to any size without losing clarity/quality.
Flash files are in the SWF format, traditionally called “ShockWave Flash” movie, and may be used in the form of a web page plug-in. After the creation of the flash file, you need to embed it into the HTML code to run it in the web page. To embed the flash file in the HTML code, insert this code in the HTML file:
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400">
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. 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 Netscape recognizes the <embed> tag and ignores the <object> tag. After this, Type in the address of the HTML file in your browse and the flash file is ready to run.
The above code is the minimum requirement to insert a flash code in an HTML file. However, to run the file properly, there are some more appropriate steps. For example, ‘classid’ is an attribute to the <object> tag. It tells Internet Explorer to load the ActiveX plug-in if it is not installed. It should be included in the file. Additionally, ‘pluginspage’ is an attribute to the <embed> tag. It displays a link to the Shockwave download page if Netscape does not have it. There are additional extremely useful features of the flash code which would be discussed in the future articles. The power and ease of flash has made it a must feature for every web developer who wants to create attractive and interactive web pages.