flash.display

# FrameLabel - AS3

Package | flash.display
Class | public final class FrameLabel
Inheritance | FrameLabel EventDispatcher Object

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

The FrameLabel object contains properties that specify a frame number and the corresponding label name.

The MovieClip class includes a `currentLabels` property, which is an Array of FrameLabel objects for the current scene. If the MovieClip instance does not use scenes, the Array includes all frame labels from the entire MovieClip instance.

The Scene class includes a `labels` property, which is an Array of FrameLabel objects for the scene.

Related API Elements

Scene.labels
MovieClip.currentLabel
MovieClip.currentLabels
MovieClip.currentScene
MovieClip.scenes
MovieClip.gotoAndPlay()
MovieClip.gotoAndStop()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | frame : int [read-only] The frame number containing the label. | FrameLabel
|  | name : String [read-only] The name of the label. | FrameLabel

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | FrameLabel(name:String, frame:int) Constructor. | FrameLabel
|  | 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
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher
|  | frameLabel | Dispatched when the playhead enter a new frame, and the frame has a FrameLabel object defined with a listener registered for the event. | FrameLabel

Property Detail

### frame

property

`frame:int` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

The frame number containing the label.

Implementation
`public function get frame():int`

### name

property

`name:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

The name of the label.

Implementation
`public function get name():String`
Constructor Detail

### FrameLabel

()
Constructor

`public function FrameLabel(name:String, frame:int)`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Constructor.

Parameters

| `name:String` — The label name.
| `frame:int` — The frame number associated with the label name.

Event Detail

### frameLabel

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.FRAME_LABEL`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11.3, AIR 3.3

Dispatched when the playhead enter a new frame, and the frame has a FrameLabel object defined with a listener registered for the event. If the playhead is not moving, or if there is only one frame, this event is dispatched continuously based on the frame rate.

The `frameLabel` event is dispatched after the `frameConstructed` event.

The `Event.FRAME_LABEL` constant defines the value of the `type` property of an `frameLabel` event object.

Note: This event has neither a "capture phase" nor a "bubble phase", which means that event listeners must be added directly to FrameLabel objects.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The FrameLabel object that is actively processing the Event object with an event listener.
`target` | Any FrameLabel instance with a listener registered for the `frameLabel` event.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00