Reference of flash in HTML -- Object embed

Source: Internet
Author: User
Flash is referenced in HTML in a specified format. The object and embed labels are generally used. Note: If you use
Object and embed
Label, the same value must be used for each attribute or parameter to ensure consistent playback on various browsers. As follows:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="900" height="300" id="FlashZhuan" >            <param name="movie" value="zhuanpan.swf">            <param name="FlashVars" value="prizeResult=3">            <param name="quality" value="high">            <param name="menu" value="false">            <param name="wmode" value="transparent">            <param name="allowScriptAccess" value="always" />                        <embed src="zhuanpan.swf" FlashVars="prizeResult=3" allowScriptAccess="always" wmode="transparent" menu="false" quality="high" width="510" height="510" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/cn/flashplayer/" name="FlashZhuan"/>    </object>

Here, the object classid and codebase values must be written in this way, telling the browser to automatically download the Flash Player address,

The object tag is used by the IE browser on the Windows platform,

Embed is used for the Netscape Navigator browser on Windows and Macintosh platforms and the IE browser on the Macintosh platform. It is called a non-IE browser.

On Windows, ie uses ActiveX controls to play flash, while other browsers use the Netscape plug-in technology to play flash.


The following summarizes the meaning of each attribute:

Required attributes:
· Classid-sets the ActiveX control of the browser, which is only used for object labels.
· Codebase-set the position 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-specifies the video. Only for embed labels.
· Pluginspage-set the flash plug-in location. If the browser is not installed, it can be automatically downloaded and installed. Only for embed labels.
· Movie-specifies the video. Only used for object tags.

Optional attributes and available values:
· ID-set the variable name for reference of 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-sets the reference directory or URL to solve the relative path in flash. Similar to the <base> label on a webpage.
· Flashvars transmits variables to Flash Player. Flash player6 and later versions are required. Pass the root variable to the video. The string format is a name = value set separated by "&", as shown in the Code: <Param name = "flashvars" value = "prizeresult = 3">

If the value of prizeresult is 3, it will be passed to the program in flash.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.