Detailed instructions for use are in the User's Guide.
[. . . ] Extending Flash
Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. [. . . ] A string that specifies how a shape tween is blended between the shape in the keyframe at the start of the tween and the shape in the following keyframe. A string that specifies effects for a sound that is attached directly to a frame (frame. soundLibraryItem). A library item (see SoundItem object) used to create a sound. An integer value that specifies the number of times a sound that is attached directly to a frame (frame. soundLibraryItem) plays. A string that specifies whether a sound that is attached directly to a frame (frame. soundLibraryItem) should play a specific number of times or loop indefinitely. A string that specifies the name of a sound that is attached directly to a frame (frame. soundLibraryItem), as stored in the library. A string that specifies the sync behavior of a sound that is attached directly to a frame (frame. soundLibraryItem). Read-only; the index of the first frame in a sequence. An integer that specifies the amount of easing that should be applied to the tweened object.
frame. motionTweenScale
frame. motionTweenSnap
frame. motionTweenSync
frame. name frame. shapeTweenBlend
frame. soundEffect
frame. soundLibraryItem
frame. soundLoop
frame. soundLoopMode
frame. soundName
frame. soundSync
frame. startFrame frame. tweenEasing
274
Objects
Property
frame. tweenType frame. useSingleEaseCurve
Description
A string that specifies the type of tween. A Boolean value that specifies whether a single custom ease curve is used for easing information for all properties.
frame. actionScript
Availability
Flash MX 2004.
Usage
frame. actionScript
Description
Property; a string that represents ActionScript code. To insert a new line character, use "\\n".
Example
The following example assigns stop() to first frame top layer action:
fl. getDocumentDOM(). getTimeline(). layers[0]. frames[0]. actionScript = 'stop();';
frame. duration
Availability
Flash MX 2004.
Usage
frame. duration
Description
Read-only property; an integer that represents the number of frames in a frame sequence.
Example
The following example stores the number of frames in a frame sequence that starts at first frame in the top layer in the frameSpan variable:
var frameSpan = fl. getDocumentDOM(). getTimeline(). layers[0]. frames[0]. duration;
Frame object
275
frame. elements
Availability
Flash MX 2004.
Usage
frame. elements
Description
Read-only property; an array of Element objects (see Element object). The order of elements is the order in which they are stored in the FLA file. If there are multiple shapes on the Stage, and each is ungrouped, Flash treats them as one element. If each shape is grouped, so there are multiple groups on the Stage, Flash sees them as separate elements. In other words, Flash treats raw, ungrouped shapes as a single element, regardless of how many separate shapes are on the Stage. If a frame contains three raw, ungrouped shapes, for example, then elements. length in that frame returns a value of 1. Select each shape individually, and group it to work around this issue.
Example
The following example stores an array of current elements on the top layer, first frame in the myElements variable:
var myElements = fl. getDocumentDOM(). getTimeline(). layers[0]. frames[0]. elements;
frame. getCustomEase()
Availability
Flash 8.
Usage
Frame. getCustomEase( [ property ] )
Parameters
An optional string that specifies the property for which you want to return the custom ease value. Acceptable values are "all", "position", "rotation", "scale", "color", and "filters". The default value is "all".
property
Returns
Returns an array of JavaScript objects, each of which has an x and y property.
276
Objects
Description
Method; returns an array of objects that represent the control points for the cubic Bézier curve that defines the ease curve.
Example
The following example returns the custom ease value of the position property for the first frame in the top layer:
var theFrame = fl. getDocumentDOM(). getTimeline(). layers[0]. frames[0] var easeArray = theFrame. getCustomEase( "position" );
See also
frame. hasCustomEase, frame. setCustomEase(), frame. useSingleEaseCurve
frame. hasCustomEase
Availability
Flash 8.
Usage
frame. hasCustomEase
Description
Property; a Boolean value. If true, the frame gets its ease information from the custom ease curve. If false, the frame gets its ease information from the ease value.
Example
The following example specifies that the first frame in the top layer should get its ease information from the ease value rather than the custom ease curve:
var theFrame = fl. getDocumentDOM(). getTimeline(). layers[0]. frames[0] theFrame. hasCustomEase = false;
See also
frame. getCustomEase(), frame. setCustomEase(), frame. useSingleEaseCurve
Frame object
277
frame. labelType
Availability
Flash MX 2004.
Usage
frame. labelType
Description
Property; a string that specifies the type of Frame name. Acceptable values are "none", "name", "comment", and "anchor". [. . . ] The caller should not free this string when it finishes.
JSObject *JS_NewArrayObject()
Usage
JSObject *JS_NewArrayObject( JSContext *cx, unsigned int length [, jsval *v ])
Description
Method; creates a new object that contains an array of JSVals.
550
C-Level Extensibility
Arguments
JSContext *cx, unsigned int length, jsval *v
The cx argument is the opaque JSContext pointer that passes to the JavaScript function. The length argument is the number of elements that the array can hold. The v argument is an optional pointer to the jsvals to be stored in the array. If the return value is not null, v is an array that contains length elements. [. . . ]