慷慨大方的花卷 · 动物识别| Avery Dennison ...· 2 月前 · |
没人理的爆米花 · 深圳航空招聘的空乘是什么编制?-深圳航空招聘 ...· 6 月前 · |
满身肌肉的小刀 · 教宝宝说话的“四大误区”,你中招了吗?_更多 ...· 1 年前 · |
纯真的柑橘 · 上海985双一流大学同济大学2021年各省各 ...· 1 年前 · |
Package | flash.display |
Class | public dynamic class MovieClip |
Inheritance | MovieClip Sprite DisplayObjectContainer InteractiveObject DisplayObject EventDispatcher Object |
Subclasses | FlexMovieClip , GravityBootstrap , LivePreviewParent , SystemManager , UIMovieClip , WindowedSystemManager |
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
The MovieClip class inherits from the following classes: Sprite, DisplayObjectContainer, InteractiveObject, DisplayObject, and EventDispatcher.
Unlike the Sprite object, a MovieClip object has a timeline.
>In Flash Professional, the methods for the MovieClip class provide the same functionality as actions that target movie clips. Some additional methods do not have equivalent actions in the Actions toolbox in the Actions panel in the Flash authoring tool.
Children instances placed on the Stage in Flash Professional cannot be accessed by code from within the
constructor of a parent instance since they have not been created at that point in code execution.
Before accessing the child, the parent must instead either create the child instance
by code or delay access to a callback function that listens for the child to dispatch
its
Event.ADDED_TO_STAGE
event.
If you modify any of the following properties of a MovieClip object that contains a motion tween,
the playhead is stopped in that MovieClip object:
alpha
,
blendMode
,
filters
,
height
,
opaqueBackground
,
rotation
,
scaleX
,
scaleY
,
scale9Grid
,
scrollRect
,
transform
,
visible
,
width
,
x
,
or
y
. However, it does not stop the playhead in any child MovieClip objects of that
MovieClip object.
More examples
Learn more
Property | Defined By | ||
---|---|---|---|
accessibilityImplementation
:
AccessibilityImplementation
The current accessibility implementation (AccessibilityImplementation)
for this InteractiveObject instance.
|
InteractiveObject | ||
accessibilityProperties
:
AccessibilityProperties
The current accessibility options for this display object.
|
DisplayObject | ||
alpha
:
Number
Indicates the alpha transparency value of the object specified.
|
DisplayObject | ||
blendMode
:
String
A value from the BlendMode class that specifies which blend mode to use.
|
DisplayObject | ||
blendShader
:
Shader
[write-only]
Sets a shader that is used for blending the foreground and background.
|
DisplayObject | ||
buttonMode
:
Boolean
Specifies the button mode of this sprite.
|
Sprite | ||
cacheAsBitmap
:
Boolean
If set to true, Flash runtimes cache an internal bitmap representation of the
display object.
|
DisplayObject | ||
cacheAsBitmapMatrix
:
Matrix
If non-null, this Matrix object defines how a display object is rendered when
cacheAsBitmap is set to true.
|
DisplayObject | ||
constructor
:
Object
A reference to the class object or constructor function for a given object instance.
|
Object | ||
contextMenu
:
NativeMenu
Specifies the context menu associated with this object.
|
InteractiveObject | ||
currentFrame
:
int
[read-only]
Specifies the number of the frame in which the playhead is located in the timeline of
the MovieClip instance.
|
MovieClip | ||
currentFrameLabel
:
String
[read-only]
The label at the current frame in the timeline of the MovieClip instance.
|
MovieClip | ||
currentLabel
:
String
[read-only]
The current label in which the playhead is located in the timeline of the MovieClip instance.
|
MovieClip | ||
currentLabels
:
Array
[read-only]
Returns an array of FrameLabel objects from the current scene.
|
MovieClip | ||
currentScene
:
Scene
[read-only]
The current scene in which the playhead is located in the timeline of the MovieClip instance.
|
MovieClip | ||
doubleClickEnabled
:
Boolean
Specifies whether the object receives doubleClick events.
|
InteractiveObject | ||
dropTarget
:
DisplayObject
[read-only]
Specifies the display object over which the sprite is being dragged, or on
which the sprite was dropped.
|
Sprite | ||
enabled
:
Boolean
A Boolean value that indicates whether a movie clip is enabled.
|
MovieClip | ||
filters
:
Array
An indexed array that contains each filter object currently associated with the display object.
|
DisplayObject | ||
focusRect
:
Object
Specifies whether this object displays a focus rectangle.
|
InteractiveObject | ||
framesLoaded
:
int
[read-only]
The number of frames that are loaded from a streaming SWF file.
|
MovieClip | ||
graphics
:
Graphics
[read-only]
Specifies the Graphics object that belongs to this sprite where vector
drawing commands can occur.
|
Sprite | ||
height
:
Number
Indicates the height of the display object, in pixels.
|
DisplayObject | ||
hitArea
:
Sprite
Designates another sprite to serve as the hit area for a sprite.
|
Sprite | ||
isPlaying
:
Boolean
[read-only]
A Boolean value that indicates whether a movie clip is curently playing.
|
MovieClip | ||
loaderInfo
:
LoaderInfo
[read-only]
Returns a LoaderInfo object containing information about loading the file
to which this display object belongs.
|
DisplayObject | ||
mask
:
DisplayObject
The calling display object is masked by the specified mask object.
|
DisplayObject | ||
metaData
:
Object
Obtains the meta data object of the DisplayObject instance if meta data was stored alongside the
the instance of this DisplayObject in the SWF file through a PlaceObject4 tag.
|
DisplayObject | ||
mouseChildren
:
Boolean
Determines whether or not the children of the object are mouse, or user input device, enabled.
|
DisplayObjectContainer | ||
mouseEnabled
:
Boolean
Specifies whether this object receives mouse, or other user input, messages.
|
InteractiveObject | ||
mouseX
:
Number
[read-only]
Indicates the x coordinate of the mouse or user input device position, in pixels.
|
DisplayObject | ||
mouseY
:
Number
[read-only]
Indicates the y coordinate of the mouse or user input device position, in pixels.
|
DisplayObject | ||
name
:
String
Indicates the instance name of the DisplayObject.
|
DisplayObject | ||
needsSoftKeyboard
:
Boolean
Specifies whether a virtual keyboard (an on-screen, software keyboard) should display
when this InteractiveObject instance receives focus.
|
InteractiveObject | ||
numChildren
:
int
[read-only]
Returns the number of children of this object.
|
DisplayObjectContainer | ||
opaqueBackground
:
Object
Specifies whether the display object is opaque with a certain background color.
|
DisplayObject | ||
parent
:
DisplayObjectContainer
[read-only]
Indicates the DisplayObjectContainer object that contains this display object.
|
DisplayObject | ||
root
:
DisplayObject
[read-only]
For a display object in a loaded SWF file, the root property is the
top-most display object in the portion of the display list's tree structure represented by that SWF file.
|
DisplayObject | ||
rotation
:
Number
Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.
|
DisplayObject | ||
rotationX
:
Number
Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
|
DisplayObject | ||
rotationY
:
Number
Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
|
DisplayObject | ||
rotationZ
:
Number
Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
|
DisplayObject | ||
scale9Grid
:
Rectangle
The current scaling grid that is in effect.
|
DisplayObject | ||
scaleX
:
Number
Indicates the horizontal scale (percentage) of the object as applied from the registration point.
|
DisplayObject | ||
scaleY
:
Number
Indicates the vertical scale (percentage) of an object as applied from the registration point of the object.
|
DisplayObject | ||
scaleZ
:
Number
Indicates the depth scale (percentage) of an object as applied from the registration point of the object.
|
DisplayObject | ||
scenes
:
Array
[read-only]
An array of Scene objects, each listing the name, the number of frames,
and the frame labels for a scene in the MovieClip instance.
|
MovieClip | ||
scrollRect
:
Rectangle
The scroll rectangle bounds of the display object.
|
DisplayObject | ||
softKeyboard
:
String
Controls the appearance of the soft keyboard.
|
InteractiveObject | ||
softKeyboardInputAreaOfInterest
:
Rectangle
Defines the area that should remain on-screen when a soft keyboard is displayed (not available on iOS).
|
InteractiveObject | ||
soundTransform
:
flash.media:SoundTransform
Controls sound within this sprite.
|
Sprite | ||
stage
:
Stage
[read-only]
The Stage of the display object.
|
DisplayObject | ||
tabChildren
:
Boolean
Determines whether the children of the object are tab enabled.
|
DisplayObjectContainer | ||
tabEnabled
:
Boolean
Specifies whether this object is in the tab order.
|
InteractiveObject | ||
tabIndex
:
int
Specifies the tab ordering of objects in a SWF file.
|
InteractiveObject | ||
textSnapshot
:
flash.text:TextSnapshot
[read-only]
Returns a TextSnapshot object for this DisplayObjectContainer instance.
|
DisplayObjectContainer | ||
totalFrames
:
int
[read-only]
The total number of frames in the MovieClip instance.
|
MovieClip | ||
trackAsMenu
:
Boolean
Indicates whether other display objects that are SimpleButton or MovieClip objects can receive
mouse release events or other user input release events.
|
MovieClip | ||
transform
:
flash.geom:Transform
An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.
|
DisplayObject | ||
useHandCursor
:
Boolean
A Boolean value that indicates whether the pointing hand (hand cursor) appears when the pointer rolls
over a sprite in which the buttonMode property is set to true.
|
Sprite | ||
visible
:
Boolean
Whether or not the display object is visible.
|
DisplayObject | ||
width
:
Number
Indicates the width of the display object, in pixels.
|
DisplayObject | ||
x
:
Number
Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of
the parent DisplayObjectContainer.
|
DisplayObject | ||
y
:
Number
Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of
the parent DisplayObjectContainer.
|
DisplayObject | ||
z
:
Number
Indicates the z coordinate position along the z-axis of the DisplayObject
instance relative to the 3D parent container.
|
DisplayObject |
Method | Defined By | ||
---|---|---|---|
MovieClip
()
Creates a new MovieClip instance.
|
MovieClip | ||
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
|
DisplayObjectContainer | ||
Adds a child DisplayObject instance to this DisplayObjectContainer
instance.
|
DisplayObjectContainer | ||
addEventListener
(type:
String
, listener:
Function
, useCapture:
Boolean
= false, priority:
int
= 0, useWeakReference:
Boolean
= false):
void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event.
|
EventDispatcher | ||
Indicates whether the security restrictions
would cause any display objects to be omitted from the list returned by calling
the DisplayObjectContainer.getObjectsUnderPoint() method
with the specified point point.
|
DisplayObjectContainer | ||
Determines whether the specified display object is a child of the DisplayObjectContainer instance or
the instance itself.
|
DisplayObjectContainer | ||
Dispatches an event into the event flow.
|
EventDispatcher | ||
Returns a rectangle that defines the area of the display object relative to the coordinate system
of the targetCoordinateSpace object.
|
DisplayObject | ||
Returns the child display object instance that exists at the specified index.
|
DisplayObjectContainer | ||
Returns the child display object that exists with the specified name.
|
DisplayObjectContainer | ||
Returns the index position of a child DisplayObject instance.
|
DisplayObjectContainer | ||
Returns an array of objects that lie under the specified point and are children
(or grandchildren, and so on) of this DisplayObjectContainer instance.
|
DisplayObjectContainer | ||
Returns a rectangle that defines the boundary of the display object,
based on the coordinate system defined by the targetCoordinateSpace
parameter, excluding any strokes on shapes.
|
DisplayObject | ||
Converts the point object from the Stage (global) coordinates
to the display object's (local) coordinates.
|
DisplayObject | ||
Converts a two-dimensional point from the Stage (global) coordinates to a
three-dimensional display object's (local) coordinates.
|
DisplayObject | ||
Starts playing the SWF file at the specified frame.
|
MovieClip | ||
Brings the playhead to the specified frame of the movie clip and stops it there.
|
MovieClip | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event.
|
EventDispatcher | ||
Indicates whether an object has a specified property defined.
|
Object | ||
Evaluates the bounding box of the display object to see if it overlaps or intersects with the
bounding box of the obj display object.
|
DisplayObject | ||
Evaluates the display object to see if it overlaps or intersects with the
point specified by the x and y parameters.
|
DisplayObject | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter.
|
Object | ||
Converts a three-dimensional point of the three-dimensional display
object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates.
|
DisplayObject | ||
Converts the point object from the display object's (local) coordinates to the
Stage (global) coordinates.
|
DisplayObject | ||
Sends the playhead to the next frame and stops it.
|
MovieClip | ||
Moves the playhead to the next scene of the MovieClip instance.
|
MovieClip | ||
Moves the playhead in the timeline of the movie clip.
|
MovieClip | ||
Sends the playhead to the previous frame and stops it.
|
MovieClip | ||
Moves the playhead to the previous scene of the MovieClip instance.
|
MovieClip | ||
Indicates whether the specified property exists and is enumerable.
|
Object | ||
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
|
DisplayObjectContainer | ||
Removes a child DisplayObject from the specified index position in the child list of
the DisplayObjectContainer.
|
DisplayObjectContainer | ||
Removes all child DisplayObject instances from the child list of the DisplayObjectContainer instance.
|
DisplayObjectContainer | ||
Removes a listener from the EventDispatcher object.
|
EventDispatcher | ||
Raises a virtual keyboard.
|
InteractiveObject | ||
Changes the position of an existing child in the display object container.
|
DisplayObjectContainer | ||
Sets the availability of a dynamic property for loop operations.
|
Object | ||
Lets the user drag the specified sprite.
|
Sprite | ||
Lets the user drag the specified sprite on a touch-enabled device.
|
Sprite | ||
Stops the playhead in the movie clip.
|
MovieClip | ||
Recursively stops the timeline execution of all MovieClips rooted at this object.
|
DisplayObjectContainer | ||
Ends the startDrag() method.
|
Sprite | ||
Ends the startTouchDrag() method, for use with touch-enabled devices.
|
Sprite | ||
Swaps the z-order (front-to-back order) of the two specified child objects.
|
DisplayObjectContainer | ||
Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the
child list.
|
DisplayObjectContainer | ||
toLocaleString
():
String
Returns the string representation of this object, formatted according to locale-specific conventions.
|
Object | ||
Returns the string representation of the specified object.
|
Object | ||
Returns the primitive value of the specified object.
|
Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type.
|
EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
Dispatched when a display object is added to the display list. | DisplayObject | |||
Dispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained. | DisplayObject | |||
Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu. | InteractiveObject | |||
Dispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu. | InteractiveObject | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same InteractiveObject when that object's doubleClickEnabled flag is set to true. | InteractiveObject | |||
[broadcast event] Dispatched when the playhead is entering a new frame. | DisplayObject | |||
[broadcast event] Dispatched when the playhead is exiting the current frame. | DisplayObject | |||
Dispatched after a display object gains focus. | InteractiveObject | |||
Dispatched after a display object loses focus. | InteractiveObject | |||
[broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run. | DisplayObject | |||
Dispatched when the user creates a point of contact along the edge of the touch surface with an InteractiveObject instance, (such as tapping along the edge of the touch surface on Siri Remote for Apple TV) Some devices might also interpret this contact as a combination of several touch events, as well. | InteractiveObject | |||
Dispatched when the user presses two points of contact over the same InteractiveObject instance on a touch-enabled device (such as presses and releases two fingers over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves a point of contact over the InteractiveObject instance on a touch-enabled device (such as moving a finger from left to right over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers and rotating them over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user creates a point of contact with an InteractiveObject instance, then taps on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
This event is dispatched to any client app that supports inline input with an IME | InteractiveObject | |||
Dispatched when the user presses a key. | InteractiveObject | |||
Dispatched when the user attempts to change focus by using keyboard navigation. | InteractiveObject | |||
Dispatched when the user releases a key. | InteractiveObject | |||
Dispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when a user presses the middle pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user attempts to change focus by using a pointer device. | InteractiveObject | |||
Dispatched when a user moves the pointing device while it is over an InteractiveObject. | InteractiveObject | |||
Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a mouse wheel is spun over an InteractiveObject instance. | InteractiveObject | |||
Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture. | InteractiveObject | |||
Dispatched by the target InteractiveObject when a dragged object is dropped on it and the drop has been accepted with a call to DragManager.acceptDragDrop(). | InteractiveObject | |||
Dispatched by an InteractiveObject when a drag gesture enters its boundary. | InteractiveObject | |||
Dispatched by an InteractiveObject when a drag gesture leaves its boundary. | InteractiveObject | |||
Dispatched by an InteractiveObject continually while a drag gesture remains within its boundary. | InteractiveObject | |||
Dispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | |||
Dispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu. | InteractiveObject | |||
Dispatched when the user lowers an active stylus past the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user lifts an active stylus above the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus over the screen while remaining within the proximity detection threshold. | InteractiveObject | |||
Dispatched when the user moves an active stylus away from this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus directly above this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus away from this InteractiveObject and any of its children while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus over this InteractiveObject from outside the object's tree of descendents in the display list (while remaining within the proximity detection threshold of the screen). | InteractiveObject | |||
Dispatched when a user releases the button on the pointing device after the user first pressed the button over an InteractiveObject instance and then moved the pointing device off of the InteractiveObject instance. | InteractiveObject | |||
Dispatched when a display object is about to be removed from the display list. | DisplayObject | |||
Dispatched when a display object is about to be removed from the display list, either directly or through the removal of a sub tree in which the display object is contained. | DisplayObject | |||
[broadcast event] Dispatched when the display list is about to be updated and rendered. | DisplayObject | |||
Dispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a select all operation or selects 'Select All' from the text context menu. | InteractiveObject | |||
Dispatched immediately after the soft keyboard is raised. | InteractiveObject | |||
Dispatched immediately before the soft keyboard is raised. | InteractiveObject | |||
Dispatched immediately after the soft keyboard is lowered. | InteractiveObject | |||
Dispatched when the value of the object's tabChildren flag changes. | InteractiveObject | |||
Dispatched when the object's tabEnabled flag changes. | InteractiveObject | |||
Dispatched when the value of the object's tabIndex property changes. | InteractiveObject | |||
Dispatched when a user enters one or more characters of text. | InteractiveObject | |||
Dispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user touches the device, and is continuously dispatched until the point of contact is removed. | InteractiveObject | |||
Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated on a touch-enabled device (such as presses and releases a finger from a single point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject |
currentFrame |
property |
currentFrame:
int
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Specifies the number of the frame in which the playhead is located in the timeline of the MovieClip instance. If the movie clip has multiple scenes, this value is the frame number in the current scene.
public function get currentFrame():
int
gotoAndStop()
method and the
currentFrame
property to direct the playhead of the
mc1
movie clip to
advance five frames ahead of its current location and stop:
mc1.gotoAndStop(mc1.currentFrame + 5);
currentFrameLabel |
property |
currentFrameLabel:
String
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4 |
The label at the current frame in the timeline of the MovieClip instance.
If the current frame has no label,
currentLabel
is
null
.
public function get currentFrameLabel():
String
currentLabel |
property |
currentLabel:
String
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
The current label in which the playhead is located in the timeline of the MovieClip instance.
If the current frame has no label,
currentLabel
is set to the name of the previous frame
that includes a label. If the current frame and previous frames do not include a label,
currentLabel
returns
null
.
public function get currentLabel():
String
currentLabel
property of a MovieClip object named
mc1
:
trace(mc1.currentLabel);
currentLabels |
property |
currentLabels:
Array
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Returns an array of FrameLabel objects from the current scene. If the MovieClip instance does not use scenes, the array includes all frame labels from the entire MovieClip instance.
public function get currentLabels():
Array
Related API Elements
currentLabels
property of a MovieClip object named
mc1
:
import flash.display.FrameLabel;
var labels:Array = mc1.currentLabels;
for (var i:uint = 0; i < labels.length; i++) {
var label:FrameLabel = labels[i];
trace("frame " + label.frame + ": " + label.name);
currentScene |
property |
currentScene:
Scene
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
The current scene in which the playhead is located in the timeline of the MovieClip instance.
public function get currentScene():
Scene
Related API Elements
currentScene
property of a MovieClip object named
mc1
:
import flash.display.Scene;
var scene:Scene = mc1.currentScene;
trace(scene.name + ": " + scene.numFrames + " frames");
enabled |
property |
enabled:
Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
A Boolean value that indicates whether a movie clip is enabled. The default value of
enabled
is
true
. If
enabled
is set to
false
, the movie clip's
Over, Down, and Up frames are disabled. The movie clip
continues to receive events (for example,
mouseDown
,
mouseUp
,
keyDown
, and
keyUp
).
The
enabled
property governs only the button-like properties of a movie clip. You
can change the
enabled
property at any time; the modified movie clip is immediately
enabled or disabled. If
enabled
is set to
false
, the object is not
included in automatic tab ordering.
public function get enabled():
Boolean
public function set enabled(value:
Boolean
):
void
enabled
property
to disable the button-like properties of a MovieClip object named
mc1
:
mc1.enabled = false;
framesLoaded |
property |
framesLoaded:
int
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
The number of frames that are loaded from a streaming SWF file. You can use the
framesLoaded
property to determine whether the contents of a specific frame and all the frames before it
loaded and are available locally in the browser. You can also use it to monitor the downloading
of large SWF files. For example, you might want to display a message to users indicating that
the SWF file is loading until a specified frame in the SWF file finishes loading.
If the movie clip contains multiple scenes, the
framesLoaded
property returns the number
of frames loaded for
all
scenes in the movie clip.
public function get framesLoaded():
int
Related API Elements
framesLoaded
property and the
totalFrames
property to determine if a streaming MovieClip
object named
mc1
is fully loaded:
if (mc1.framesLoaded == mc1.totalFrames) {
trace("OK.");
isPlaying |
property |
scenes |
property |
scenes:
Array
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
An array of Scene objects, each listing the name, the number of frames, and the frame labels for a scene in the MovieClip instance.
public function get scenes():
Array
Related API Elements
scenes
property of a MovieClip object named
mc1
:
import flash.display.Scene;
for (var i:uint = 0; i < mc1.scenes.length; i++) {
var scene:Scene = mc1.scenes[i];
trace("scene " + scene.name + ": " + scene.numFrames + " frames");
totalFrames |
property |
totalFrames:
int
[read-only]
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
The total number of frames in the MovieClip instance.
If the movie clip contains multiple frames, the
totalFrames
property returns
the total number of frames in
all
scenes in the movie clip.
public function get totalFrames():
int
totalFrames
property of a MovieClip object named
mc1
:
trace(mc1.totalFrames);
trackAsMenu |
property |
trackAsMenu:
Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9 |
Indicates whether other display objects that are SimpleButton or MovieClip objects can receive
mouse release events or other user input release events. The
trackAsMenu
property lets you create menus. You
can set the
trackAsMenu
property on any SimpleButton or MovieClip object.
The default value of the
trackAsMenu
property is
false
.
You can change the
trackAsMenu
property at any time; the modified movie
clip immediately uses the new behavior.
public function get trackAsMenu():
Boolean
public function set trackAsMenu(value:
Boolean
):
void
trackAsMenu
property to enable mouse release events for a MovieClip object named
mc1
:
mc1.trackAsMenu = true;
MovieClip |
() | Constructor |
public function MovieClip()
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Creates a new MovieClip instance. After creating the MovieClip, call the
addChild()
or
addChildAt()
method of a
display object container that is onstage.
gotoAndPlay |
() | method |
public function gotoAndPlay(frame:
Object
, scene:
String
= null):
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Starts playing the SWF file at the specified frame. This happens after all
remaining actions in the frame have finished executing. To specify a scene
as well as a frame, specify a value for the
scene
parameter.
Parameters
frame
:
Object
— A number representing the frame number, or a string representing the label of the
frame, to which the playhead is sent. If you specify a number, it is relative to the
scene you specify. If you do not specify a scene, the current scene determines the global frame number to play. If you do specify a scene, the playhead
jumps to the frame number in the specified scene.
|
|
scene
:
String
(default =
null
)
— The name of the scene to play. This parameter is optional.
|
gotoAndPlay()
method to direct the playhead of
the
mc1
movie clip to advance five frames ahead of its current location:
mc1.gotoAndPlay(mc1.currentFrame + 5);
gotoAndPlay()
method to direct the playhead of
the
mc1
movie clip to the frame labeled
"intro"
in the scene named
"Scene 12"
:
mc1.gotoAndPlay("intro", "Scene 12");
gotoAndStop |
() | method |
public function gotoAndStop(frame:
Object
, scene:
String
= null):
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Brings the playhead to the specified frame of the movie clip and stops it there. This happens after all
remaining actions in the frame have finished executing. If you want to specify a scene in addition to a frame,
specify a
scene
parameter.
Parameters
frame
:
Object
— A number representing the frame number, or a string representing the label of the
frame, to which the playhead is sent. If you specify a number, it is relative to the
scene you specify. If you do not specify a scene, the current scene determines the global frame number at which to go to and stop. If you do specify a scene,
the playhead goes to the frame number in the specified scene and stops.
|
|
scene
:
String
(default =
null
)
— The name of the scene. This parameter is optional.
|
ArgumentError
— If the
scene
or
frame
specified are
not found in this movie clip.
|
gotoAndStop()
method and the
currentFrame
property to direct the playhead of the
mc1
movie clip to
advance five frames ahead of its current location and stop:
mc1.gotoAndStop(mc1.currentFrame + 5);
gotoAndStop()
to direct the playhead of
the
mc1
movie clip to the frame labeled
"finale"
in the scene named
"Scene 12"
and stop the playhead:
mc1.gotoAndStop("finale", "Scene 12");
nextFrame |
() | method |
public function nextFrame():
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Sends the playhead to the next frame and stops it. This happens after all remaining actions in the frame have finished executing.
Related API Elements
prev
button moves the playhead to the previous frame, and the
nextBtn
button moves the playhead
to the next frame:
import flash.events.MouseEvent;
mc1.stop();
prevBtn.addEventListener(MouseEvent.CLICK, goBack);
nextBtn.addEventListener(MouseEvent.CLICK, goForward);
function goBack(event:MouseEvent):void {
mc1.prevFrame();
function goForward(event:MouseEvent):void {
mc1.nextFrame();
nextScene |
() | method |
public function nextScene():
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Moves the playhead to the next scene of the MovieClip instance. This happens after all remaining actions in the frame have finished executing.
prevBtn
button moves the playhead to the previous scene, and the
nextBtn
button moves the playhead
to the next scene:
import flash.events.MouseEvent;
mc1.stop();
prevBtn.addEventListener(MouseEvent.CLICK, goBack);
nextBtn.addEventListener(MouseEvent.CLICK, goForward);
function goBack(event:MouseEvent):void {
mc1.prevScene();
function goForward(event:MouseEvent):void {
mc1.nextScene();
play |
() | method |
public function play():
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Moves the playhead in the timeline of the movie clip.
Related API Elements
stop()
method to stop a movie clip
named
mc1
and to resume playing when the user clicks the text field named
continueText
:
import flash.text.TextField;
import flash.events.MouseEvent;
var continueText:TextField = new TextField();
continueText.text = "Play movie...";
addChild(continueText);
mc1.stop();
continueText.addEventListener(MouseEvent.CLICK, resumeMovie);
function resumeMovie(event:MouseEvent):void {
mc1.play();
prevFrame |
() | method |
public function prevFrame():
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Sends the playhead to the previous frame and stops it. This happens after all remaining actions in the frame have finished executing.
prev
button moves the playhead to the previous frame, and the
nextBtn
button moves the playhead
to the next frame:
import flash.events.MouseEvent;
mc1.stop();
prevBtn.addEventListener(MouseEvent.CLICK, goBack);
nextBtn.addEventListener(MouseEvent.CLICK, goForward);
function goBack(event:MouseEvent):void {
mc1.prevFrame();
function goForward(event:MouseEvent):void {
mc1.nextFrame();
prevScene |
() | method |
public function prevScene():
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Moves the playhead to the previous scene of the MovieClip instance. This happens after all remaining actions in the frame have finished executing.
prevBtn
button moves the playhead to the previous scene, and the
nextBtn
button moves the playhead
to the next scene:
import flash.events.MouseEvent;
mc1.stop();
prevBtn.addEventListener(MouseEvent.CLICK, goBack);
nextBtn.addEventListener(MouseEvent.CLICK, goForward);
function goBack(event:MouseEvent):void {
mc1.prevScene();
function goForward(event:MouseEvent):void {
mc1.nextScene();
stop |
() | method |
public function stop():
void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4 |
Stops the playhead in the movie clip.
getPropertiesString()
method is used as text for the
outputText
text field. The
getPropertiesString()
method returns
a string that is populated with values of the following properties of the movie clip:
currentFrame
,
currentLabel
,
currentScene
,
framesLoaded
,
totalFrames
, and
trackAsMenu
.
width
and
height
properties of the
outputText
text field.
outputText
text field
to the display list.