Detailed description of flash code inserted in html (reproduced) and detailed description of flash
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6, 0,40,0" WIDTH="550" HEIGHT="400" > <PARAM VALUE="myFlashMovie.swf"> <PARAM VALUE=high> <PARAM VALUE=#FFFFFF> <EMBED src="/support/flash/ts/documents/myFlashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="myMovieName" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>
Explanation:
The OBJECT tag is used in windows IE3.0 and later browsers or other browsers that support Activex controls. The "classid" and "codebase" attributes must be exactly written as shown in the preceding example. They tell the browser to automatically download the flash player address. If you have not installed flash player, then IE3.0 and later browsers will jump out of a prompt box to see if you want to automatically install flash player. Of course, if you do not want users who do not have flash player installed to automatically download the player, you may omit the code.
EMBED labels are used in Netscape Navigator2.0 and later browsers or other browsers that support the Netscape plug-in. The pluginspage attribute tells the browser the address for downloading the flash player. If flash player is not installed, restart the browser after installation.
To ensure that most browsers can normally display flash, you need to nest the EMBED tag in the OBJECT tag, just like the code example above. Browsers that support Activex controls will ignore the EMBED tag in the OBJECT tag. Netscape and IE browser using plug-ins will only read the EMBED tag, but will not recognize the OBJECT tag. That is to say, if you omit the EMBED tag, firefox will not be able to identify your flash (but it is puzzled that, If you omit the object, only embed will be written, and IE will be able to display the flash normally, take a closer look ).
This article lists the necessary and optional attributes of the OBJECT and EMBED labels used to publish a video.
1. required attributes:
· CLASSID-Set Activex controls of the browser. They are only used for OBJECT tags, class IDs, and ActiveX component IDs. They are used to find the corresponding components in the registry.
· CODEBASE-Set the location of the flash Activex control. If the browser is not installed, it can be automatically downloaded and installed. Only used for OBJECT tags.
· WIDTH-Specify the width of the flash video in percentages or pixels.
· HEIGHT-Specify the height of the flash video in percentages or pixels.
· SRC-Specify the video. Only for EMBED labels.
· PLUGINSPAGE-Set the location of the flash plug-in. If the browser is not installed, You can automatically download and install the plug-in. Only for EMBED labels.
· MOVIE-Specify the video. Only used for OBJECT tags.
2. Optional attributes and available values:
· ID-Set the variable name for reference to the script code. Only for objects.
· NAME-Set the variable name for reference of script code (such as javascript. EMBED only.
· SWLIVECONNECT-(True or false) Specifies whether to enable java when flash player is downloaded for the first time. If some attributes are omitted, the default value is false. If you use javascript and flash on the same page, java must use FSCommand to work.
· PLAY-(True or false) specifies whether the flash video is automatically played after the download is complete. If this attribute is omitted, the default value is true.
· LOOP-(True or false) Specifies whether to stop or continue loop playback after the last frame of the video is played. If this attribute is omitted, the default value is true.
· MENU-(True or false)
· True: displays all menus, allowing you to zoom in or zoom out to control video playback and other operations.
· False: only the set options and flash menus are displayed.
· QUALITY-(Low, high, autolow, autohigh, best)
· Low is faster than beautiful and does not apply anti-sawtooth.
· Autolow focuses on speed at the beginning, but it can be improved at any time when needed.
· Autohigh focuses on both playback speed and aesthetic, but sacrifices the aesthetic to ensure playback speed when needed.
· Medium applies some anti-sawtooth bitmap without smoothing the bitmap. Its quality is higher than the low setting but lower than the high setting.
· High aesthetics is superior to playback speed, and anti-aliasing is always applied. If the video does not contain an animation, the bitmap will be smoothed; if the video contains an animation, the bitmap will not change.
· Best provides the Best display quality without considering the playback speed. All outputs apply anti-sawtooth and all bitmaps are smoothed.
· SCALE-(Showall, noborder, exactfit)
· The Default (Show all) video is displayed in the specified area, but the original proportion is maintained. A border will appear on both sides of the video.
· No Boder compresses the film to fit the specified area and keeps the film undistorted. However, some films may be cropped. However, keep the original proportion of the video.
· Exact Fit enables the entire video to be displayed in the specified area. The film may be distorted without retaining the original proportion.
· ALIGN-(L, t, r, B)
· The default value is center. When the browser window is smaller than the video, the edge is cropped.
· Left, Right, Top, and Bottom are aligned along the edge of the browser according to the corresponding settings. If necessary, the other three sides will be cropped.
· SALIGN-(L, t, r, B, tl, tr, bl, br)
· L, R, T, B
· TL, TR
· BL, BR
· WMODE-(Window, opaque, transparent) sets the window mode attribute of the flash video, specifying the transparency, stack, and position of the flash in the browser.
· Window Film is played in the browser's rectangular Window.
· The Opaque film hides all content behind it.
· Transparent makes the flash video Transparent and displays the webpage content behind the Transparent video. This will reduce the animation performance. This attribute is not available in all browsers.
· BGCOLOR-(# RRGGBB, hexadecimal RGB value .) Specifies the background color of the video. Use this property to overwrite the background color set in flash.
· BASE-Set the reference directory or URL to solve the relative path in flash. Similar to the <base> label on a webpage.
· FLASHVARSTo pass variables to flash player, flash player6 and later versions are required.
· Pass the root variable to the video. The string format is the name = value set separated.
· The browser supports 64 kB String Length.
·