FLASH PLAYER控件(ActiveX)

      AS2.0 2005-9-1 15:45
属性,事件,方法.方便自己查询啊,^*^......

The documentation below describes the scripting interface for the Flash Player ActiveX control. This control handles playback of Flash content on Windows machines which support ActiveX (all 32-bit versions of Windows, beginning with Windows 95.) These methods may also be available to PocketPC Devices using the Flash Player for PocketPC (see the Flash Player for PocketPC FAQ for details.)

Experienced scripters should first read the article Scripting with Flash for an overview of javascript methods which can control the Flash Player. Beginning scripters may benefit more from the example based TechNotes "An example of communication between javascript and Flash" (TechNote 15683) and "An example of communication between Flash movies" (TechNote 15692).

Note: Most of these methods, properties and events are not available in the Netscape Navigator plug-in version of the Macromedia Flash Player, only the Flash Player ActiveX control for Windows.

+++++++++++++++++++++++++++Properties+++++++++++++++++++++++++
ReadyState (get only) - 0=Loading, 1=Uninitialized, 2=Loaded, 3=Interactive, 4=Complete.

TotalFrames (get only) - Returns the total number of frames in the movie. This is not available until the movie has loaded. Wait for ReadyState = 4.

FrameNum (get or set) - The currently displayed frame of the movie. Setting this will advance or rewind the movie.

Playing (get or set) - True if the movie is currently playing, false if it is paused.

Quality (get or set) - The current rendering quality (0=Low, 1=High, 2=AutoLow, 3=AutoHigh). This is the same as the QUALITY parameter.

ScaleMode (get or set) - Scale mode (0=ShowAll, 1= NoBorder, 2 = ExactFit). This is the same as the SCALE parameter.

AlignMode (get or set) - The align mode consists of bit flags. (Left=+1, Right=+2, Top=+4, Bottom=+8). This is the same as the SALIGN parameter.

BackgroundColor (get or set) - Override the background color of a movie. An integer of the form red*65536+green*256+blue use -1 for the default movie color.

Loop (get or set) - True if the animation loops, false to play once. Same as the MOVIE parameter.

Movie (get or set) - The URL source for the Flash Player movie file. Setting this will load a new movie into the control. Same as the MOVIE parameter.

+++++++++++++++++++++++++++++++Methods+++++++++++++++++++++++++++
Play() - Start playing the animation.

Stop() - Stop playing the animation.

Back() - Go to the previous frame.

Forward() - Go to the next frame.

Rewind() - Go to the first frame.

SetZoomRect(int left, int top, int right, int bottom) - Zoom in on a rectangular area of the movie. Note that the units of the coordinates are in twips (1440 units per inch). To calculate a rectangle in Flash, set the ruler units to Points and multiply the coordinates by 20 to get TWIPS.

Zoom(int percent) - Zoom the view by a relative scale factor. Zoom(50) will double the size of the objects in the view. Zoom(200) will reduce the size of objects in the view by one half.

Pan(int x, int y, int mode) - Pan a zoomed in movie. The mode can be: 0 = pixels, 1 = % of window.

+++++++++++++++++++++++++++++Events++++++++++++++++++++++++
OnProgress(int percent) - Generated as the Flash Player movie is downloading.

OnReadyStateChange(int state) - Generated when the ready state of the control changes. The possible states are 0=Loading, 1=Uninitialized, 2=Loaded, 3=Interactive, 4=Complete.

FSCommand(string command, string args) - This event is generated when a GetURL action is performed in the movie with a URL and the URL starts with "FSCommand:". The portion of the URL after the : is provided in command and the target is provided in args. This can be used to create a response to a frame or button action in the Shockwave Flash movie.

HTML(网页中示例)
The HTML to insert the Flash Player ActiveX control and a movie in a page is:

<OBJECT ID="map" CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0"
width=300 height=150 align=center>
<param NAME="Movie" value="map.swf">
<param NAME="Play" value="False">
<param NAME="Loop" value="False">
<param NAME="Quality" value="High">
<param NAME="Scale" value="ShowAll">
<param NAME="SAlign" value="TR">
<param NAME="BGColor" value="808080">
</OBJECT>
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commenttime}{commentauthor}

{CommentUrl}
{commentcontent}