Flash MX 2004 JSFL Reference

Table of Contents

  1. BitmapInstance
  2. BitmapItem
  3. CompiledClipInstance
  4. ComponentInstance
  5. ComponentsPanel
  6. Contour
  7. Document
  8. DrawingLayer
  9. Edge
  10. Effect
  11. Element
  12. EmbeddedVideoInstance
  13. Fill
  14. Flash
  15. FolderItem
  16. FontItem
  17. Frame
  18. Functions
  19. HalfEdge
  20. Instance
  21. Item
  22. Layer
  23. Library
  24. LinkedVideoInstance
  25. Math
  26. Matrix
  27. OutputPanel
  28. Parameter
  29. Path
  30. Screen
  31. ScreenOutline
  32. ScreenType
  33. Shape
  34. SoundItem
  35. Stroke
  36. SymbolInstance
  37. SymbolItem
  38. Text
  39. TextAttrs
  40. TextRun
  41. Timeline
  42. ToolObj
  43. Tools
  44. Vertex
  45. VideoItem
  46. XMLUI

Flash MX 2004 JSFL Reference

Flash MX 2004 JSFL Reference

1. BitmapInstance

Subclass of Instance; a bitmap on the Stage

Methods

Name Args Description
getBits bitmap Gets bits from a bitmap
setBits bitmap Sets bits of a bitmap

Properties

Name Description
hPixels Width of BItmapInstance in pixels
vPixels Height of BItmapInstance in pixels

2. BitmapItem

Subclass of Item; a bitmap symbol in the Library

Properties

Name Description
allowSmoothing If true, smooths edges of bitmap with anti-aliasing
compressionType Specifies compression type for export
quality Quality for JPEG compression
useImportedJPEGQuality If true, imported JPEG's quality for export

3. CompiledClipInstance

Subclass of SymbolInstance; a compiled clip instance on the Stage

Properties

Name Description
accName Name of an object, used by screen reader
actionScript String representing the ActionScript on an instance
description Description of the object, used by screen reader
forceSimple If true, the children of the object are not accessible to screen reader
shortcut An object's runtime shortcut key
silent If true, object is not read by screen reader
tabIndex tabIndex value of an object

4. ComponentInstance

Subclass of SymbolInstance; a component instance on the Stage

Properties

Name Description
parameters Component's parameters

5. ComponentsPanel

Components panel

Methods

Name Args Description
addItemToDocument position, categoryName, componentName Adds component to the document

6. Contour

A closed path of half edges

Methods

Name Args Description
getHalfEdge Returns a halfEdge object

Properties

Name Description
interior If true, contour encloses an area
orientation Integer indicating the orientation of a contour

7. Document

The Stage

Methods

Name Args Description
addDataToDocument name, type, data Stores data with a document
addDataToSelection name, type, data Stores data with selected objects
addItem position, item Adds an Item from the Library to the Stage
addNewLine startPoint, endPoint Draws a line on the Stage
addNewOval boundingRectangle [, bSuppressFill] [, bSuppressStroke] Draws an oval on the Stage
addNewPublishProfile [profileName] Adds a new publish profile
addNewRectangle boundingRectangle, roundness [, bSupressFill] [, bSuppressStroke] Draws a new rectangle on the Stage
addNewScene [name] Adds a new scene
addNewText boundingRectangle Inserts a new empty text field
align alignmode [, bUseDocumentBounds] Aligns the selection
allowScreens Checks if the Screen Outline is available
arrange arrangeMode Arranges the selection
breakApart Breaks apart the current selection
canEditSymbol If true, the editSymbol() method can be used
canRevert Indicates if a document can be reverted
canTestMovie Indicates if movie can be tested
canTestScene Indicates if current scene can be tested
clipCopy Copies the selection selection to the Clipboard
clipCut Cuts the selection to the Clipboard
clipPaste [bInPlace] Pastes the Clipboard into the document
close [bPromptToSaveChanges] Closes the current document
convertLinesToFills Converts lines to fills on selected objects
convertToSymbol type, name, registrationPoint Converts selected items to a new symbol
deletePublishProfile Deletes the current publish profile
deleteScene Deletes the current scene
deleteSelection Deletes the selection from the Stage
distribute distributemode [, bUseDocumentBounds] Distributes the selection
distributeToLayers Distributes the current selection to layers
documentHasData name If true, there is persistent data
duplicatePublishProfile [profileName] Duplicates the current profile
duplicateScene Duplicates the current scene
duplicateSelection Duplicates the selection
editScene index Sets the specified scene to be the current one
enterEditMode [editMode] Enters an edit mode for a symbol or group
exitEditMode Exits an edit mode
exportPublishProfile fileURI Exports the current publish profile to file
exportSWF [fileURI] [, bCurrentSettings] Exports document as a SWF
getAlignToDocument Returns the value of the Align to Stage setting
getCustomFill [locationOfFill] Returns the Fill object of selection or toolbar
getCustomStroke [locationOfFill] Returns the Stroke object or toolbar setting
getDataFromDocument name Returns the value of the named data
getElementProperty propertyName Returns the specified Element property
getElementTextAttr attrName [, startIndex] [, endIndex] Returns the specified TextAttrs property
getSelectionRect Returns the bounding rectangle of the selection
getTextString [startIndex] [, endIndex] Returns the text string of the selected text
getTimeline Returns the current timeline
getTransformationPoint Returns the location of the transformation point
group Converts the selection to a group
importPublishProfile fileURI Imports a publish profile from file
importSWF fileURI Imports a SWF into the document
match bWidth, bHeight [, bUseDocumentBounds] Makes the size of selected objects equal
mouseClick position, bToggleSel, bShiftSel Performs a mouse click
mouseDblClk position, bAltDown, bShiftDown, bShiftSelect Performs a mouse double click
moveSelectedBezierPointsBy delta Moves the selected Bezier points
moveSelectionBy distanceToMove Moves the selection
optimizeCurves smoothing, bUseMultiplePasses Opimizes the curves of the selected shape
publish Publishes a document
removeDataFromDocument name Removes persistent data from document
removeDataFromSelection name Removes persistent data from selected objects
renamePublishProfile [profileNewName] Renames the current publish profile
renameScene name Renames the selected scene
reorderScene sceneToMove, sceneToPutItBefore Reorders specified scene
resetTransformation Resets the transformation matrix
revert Reverts the specified document
rotateSelection angle [, rotationPoint] Rotates a selection
save [bOkToSaveAs] Saves document
saveAndCompact [bOkToSaveAs] Saves and compacts document
scaleSelection xScale, yScale [, whichCorner] Scales a selection
selectAll Selects all items on the Stage
selectNone Deselects all items on the Stage
setAlignToDocument bToStage If true, objects are aligned, distributed, sized, or spaced to the Stage
setCustomFill fill Sets the current fill settings of selection or toolbar
setCustomStroke stroke Sets the current stroke settings of selection or toolbar
setElementProperty property, value Sets the specified property of an Element object
setElementTextAttr attrName, attrValue [, startIndex] [, endIndex] Sets the specified property of the selected text items
setFillColor color Changes the fill color of a selection
setInstanceAlpha opacity Sets the opacity of an instance
setInstanceBrightness brightness Sets the brightness of an instance
setInstanceTint color, strength Sets the tint of an instance
setSelectionBounds boundingRectangle Moves and resizes a selection
setSelectionRect rect [, bReplaceCurrentSelection] Sets the selection rectangle
setStroke color, size, stroke Sets stroke properties of selected stroke
setStrokeColor color Changes the stroke color of selected stroke
setStrokeSize size Changes the stroke width of selected stroke
setStrokeStyle stroke Changes the stroke style of selected stroke
setTextRectangle boundingRectangle Changes the bounding rectangle for the selected text item
setTextSelection startIndex, endIndex Sets the text selection of the selected text field
setTextString text [, startIndex] [, endIndex] Adds specifed text string to selected text field
setTransformationPoint transformationPoint Moves the transformation point of selection
skewSelection xSkew, ySkew [, whichEdge] Skews the selection
smoothSelection Smoothes the selected curve of a shape
space direction [, bUseDocumentBounds] Spaces the objects of a selection evenly
straightenSelection Straightens the selected curve of a shape
swapElement name Swaps selected symbol with specifed one
testMovie Test Movie
testScene Test Current Scene
traceBitmap threshold, minimumArea, curveFit, cornerThreshold Traces a bitmap
transformSelection a, b, c, d Performs a general transformation
unGroup Ungroups the selected group
unlockAllElements Unlocks all symbols on the current frame
xmlPanel fileURI Displays the specified XMLUI dialog box

Properties

Name Description
accName Name of movie, used by screen reader
autoLabel If true, turns on automatic labeling for screen reader
backgroundColor A color representing the background
currentPublishProfile Sets and returns the name of the active publish profile
currentTimeline Represents the active timeline
description Description of the main movie, used by screen reader
forceSimple If true, the children of the object are not accessible to screen reader
frameRate Document's frames per second
height Height of the document
library Represents the document's Library
livePreview If true, visually displays components at authortime
name Name of the document
path The file path of the document
publishProfiles An array containing the publish profiles for document
screenOutline The current ScreenOutline object for the document
selection An array of selected Element objects
silent If true, movie is not read by screen reader
timelines An array containing the Timeline objects of the document
width Width of the document

8. DrawingLayer

Used by tools for temporary drawing while dragging the mouse

Methods

Name Args Description
beginDraw [persistentDraw] Puts Flash into drawing mode
beginFrame Starting point to delimit a set of lines
cubicCurveTo x1Ctrl, y1Ctrl, x2Ctl, y2Ctl, xEnd, yEnd Draws a cubic curve
curveTo x1Clt, y, x2, y2 Draws a quadratic curve segment
drawPath path Draws the specified path
endDraw Exits drawing mode
endFrame Erases the paths drawn by DrawingLayer object
lineTo x, y Draws a line
moveTo x, y Sets the current drawing position
newPath Returns a new path object
setColor color Sets the color of subsequently drawn data

9. Edge

Represents an edge of an object on the Stage

Methods

Name Args Description
getControl int i Returns the control point of the specified Edge object
getHalfEdge index Returns a HalfEdge object
setControl index, x, y Sets the control point of an edge
splitEdge t Divides specified Edge object into two

Properties

Name Description
id An unique identifier for the Edge object
isLine If true, Edge is a straight line

10. Effect

An instance of an effect

Properties

Name Description
effectName Name of an effect, used to create menu item
groupName Name of an effect group, used to create the menu item
sourceFile Name of JSFL source file
symbolType Name of symbolType to create during initial application of the effect
useXMLToUI If true, displays a XMLUI dialog box

11. Element

Represents all objects on the Stage

Methods

Name Args Description
getPersistentData name Returns the value of the named data
hasPersistentData name If true, data with specified name is attached to object
removePersistentData name Removes persistent data attached to object
setPersistentData name, type, value Stores specified data with an object

Properties

Name Description
depth Returns the drawing order of the objects on stage
elementType Type of Element object
height Height of the Element
left Left side of Element
locked If true, the Element is locked
matrix References the TransformationMatrix object
name Instance Name of Element
top Top side of Element
width Width of the Element

12. EmbeddedVideoInstance

Subclass of Instance; an embedded video instance on the Stage

13. Fill

Fill settings for the selection or Toolbar

Properties

Name Description
color The fill color
colorArray An array of colors in a gradient
posArray Indicates the position of the corresponding color in a gradient
style The fill style

14. Flash

The Flash application

Methods

Name Args Description
browseForFileURL browseType [, title] [, previewArea] Brings up an Open or Save dialog box
closeAll Closes all open documents
closeDocument documentObject [, bPromptToSaveChanges] Closes the specified document
createDocument [docType] Opens a new document
enableImmediateUpdates If true, updates to the timeline display when executing an effect. Only used for debugging effect.
fileExists fileURI Returns true if specified file exists
findDocumentIndex name Returns the specified Document object's index
findScreenType name [, version] Returns the specified ScreenType
getDocumentDOM Returns the active Document object
invokeScreenType name [, version] Invokes a ScreenType
openDocument fileURI Opens specified FLA file
quit [bPromptIfNeeded] Quits Flash
reloadEffects Reloads all effects descriptors
reloadTools Rebuilds the Toolbar
revertDocument documentObject Reverts specified document
runScript fileURI [, funcName] [, arg] Executes a JavaScript file
saveAll Saves all open documents
saveDocument document [, fileURI] Saves specified document
saveDocumentAs document Displays the Save As dialog
setActiveWindow document [, bActivateFrame] Sets the active window to be the specified document
trace message Sends a test string to the Output panel

Properties

Name Description
activeEffect The effect descriptor
componentsPanel Reference to the Components panel
configDirectory Contains the full path name for local user's Configuration directory
configURI Returns the URI to the local user's config directory
documents An array of Document objects
effects An array of effect descriptors
Math Reference to a Math object
outputPanel Reference to Output panel object
screenTypes An array of all ScreenType objects in the system
tools An array of ToolsObj objects
version Returns the Flash authoring tool's version
viewMatrix References the TransformationMatrix object
xmlui References a XMLUI dialog box

15. FolderItem

Subclass of Item; a folder in the Library

16. FontItem

Subclass of Item; a font symbol in the Library

17. Frame

A frame on the Timeline

Properties

Name Description
actionScript String containing the ActionScript on a frame
duration Number of frames in a frame span
elements An array of Element objects
labelType This specifies the type of frame label
motionTweenOrientToPath If true, object tweens oriented to path
motionTweenRotate Specifies if the object rotates during tween
motionTweenRotateTimes Number of rotations
motionTweenScale If true, object scales while tweening
motionTweenSnap If true, object snaps to motion guide
motionTweenSync If true, tween synchronizes symbols
name Label of the frame
shapeTweenBlend Specifieds the blend setting for a shape tween
soundEffect The effects on the sound
soundLibraryItem Library item used to instantiate a sound
soundLoop Specifies the number of times a sound loops
soundLoopMode Specifies whether sound should loop or repeat indefinitely
soundName Name of sound
soundSync Specifies the sync behavior of a sound
startFrame The frame number of the first frame in a span
tweenEasing The amount of easing
tweenType The type of tween

18. Functions

Flash JavaScript functions

19. HalfEdge

Half of an edge of a contour

Methods

Name Args Description
getEdge Returns the Edge object that contains the HalfEdge
getNext Returns the next HalfEdge
getOppositeHalfEdge Returns the oposite HalfEdge object
getPrev Returns the preceding HalfEdge
getVertex Returns the vertex of the HalfEdge

Properties

Name Description
id An unique identifier for the HalfEdge
index The index of the HalfEdge in the parent Edge

20. Instance

Subclass of Element; an instance on the Stage

Properties

Name Description
instanceType Type of Instance
libraryItem Library item used to instantiate Instance

21. Item

Items in the Library

Methods

Name Args Description
addData name, type, data Adds persistent data to Item
getData name Returns the value of the named data
hasData name If true, the Library item has the named data
removeData name Removes persistent data from the Library item

Properties

Name Description
itemType The symbol type of the Item
linkageClassName Specifies an ActionScript 2 class to associate with symbol
linkageExportForAS If true, the Item will be exported for ActionScript
linkageExportForRS If true, the Item will be exported for runtime sharing
linkageExportInFirstFrame If true, the Item will be exported in the first frame
linkageIdentifier The name of the symbol when referenced by ActionScript or runtime sharing
linkageImportForRS If true, the Item will be imported for runtime sharing
linkageURL Location of the shared asset SWF
name Name of the Library item

22. Layer

A layer on the Timeline

Properties

Name Description
color The color used to outline objects on the layer
frameCount Total number of frames in the Layer
frames An array of Frame objects
height Height of the Layer
layerType Specifies the Layer type
locked If true, Layer is locked
name Name of the Layer
outline If TRUE, Layer is displayed as outlines
parentLayer Defines the Layers's parent Layer
visible If true, Layer is visible

23. Library

The Library panel

Methods

Name Args Description
addItemToDocument position [, namePath] Adds an Item from the Library to the document
addNewItem type [, namePath] Creates a new Item
deleteItem [namePath] Deletes an Item
duplicateItem [namePath] Makes a copy of the currently selected Item
editItem [namePath] Returns true if the specified Item is editable
expandFolder bExpand [, bRecurseNestedParents] [, namePath] If true, expands folder; if false collapses it
findItemIndex namePath Returns an object containing the index of the Item
getItemProperty property Returns specified property for a selected Item
getItemType [namePath] Returns the type of the specified Item
getSelectedItems Returns an array containing the selected Items
importEmbeddedSWF linkageName, swfData [, libName] Imports a contained SWF to the Library
itemExists namePath Returns true if the specified Item exists
moveToFolder folderPath [, itemToMove] [, replace] Moves Item into a folder
newFolder [namePath] Creates a new Folder
renameItem namePath Renames selected Item
selectAll [] Selects all Items
selectItem namePath [, bReplaceCurrentSelection] [, bSelect] Selects specified Item
selectNone Deselects all Items
setItemProperty property, value Sets specified property for the currently selected Items
updateItem [namePath] Updates specified Item

Properties

Name Description
items An array containing all Item objects in the Library

24. LinkedVideoInstance

Subclass of Instance; a linked video instance on the Stage

25. Math

Used to do common mathematical operations

Methods

Name Args Description
concatMatrix mat1, mat2 Performs concatenates the specified Matrix objects
invertMatrix mat Returns the inverse of specified Matrix
pointDistance pt1, pt2 Computes the distance between specified points

26. Matrix

The transformation matrix

Properties

Name Description
a The scale factor to the x axis
b Skews object by moving right edge along vertical axis
c Skews object by moving bottom edge along horizontal axis
d The scale factor to the y axis
tx The location of the object along the x axis
ty The location of the object along the y axis

27. OutputPanel

The Output panel

Methods

Name Args Description
clear Clears contents from the panel
save fileURI [, bAppendToFile] Saves the contents of the Output Panel to a file
trace message Sends a test string to the Output panel

28. Parameter

Parameters for a Screen or Component

Methods

Name Args Description
insertItem index, name, value, type Inserts Parameter into a list, object, or array
removeItem index Deletes Parameter from a list, object, or array

Properties

Name Description
category Groups items in the Components panel, or organizes Screens
listIndex The value of the specified item; for type list only
name The name of Parameter
value The value of the property
valueType The property's value type
verbose Determines if Parameter appears in Properties Inspector

29. Path

Contains a defined sequence of line segments

Methods

Name Args Description
addCubicCurve xAnchor, yAnchor, x1, y1, x2, y, x4, y4 Appends a cubic Bezier curve segment to Path
addCurve x0, y0, x1, y1 Appends a quadratic Bezier segment to Path
addPoint x, y Adds a point to the Path
clear Removes all points from the Path
close Appends a point at the location of the first point of the Path
makeShape [bSupressFill] [, bSupressStroke] Creates a shape
newContour Starts a new Contour in the Path

Properties

Name Description
nPts Returns integer representing the number of points in the Path

30. Screen

A Screen in the ScreenOutline

Properties

Name Description
accName Name of an object, used by screen reader
childScreens An array of child Screens
description Description of the object, used by screen reader
forceSimple If true, the children of the object are not accessible to screen reader
hidden If true, Screen is not visible by any other Screens
instanceName The Screen's instance name
name The name of the Screen
nextScreen The next sibling in a childScreen array
parameters The properties in the Screen's Property Inspector
parentScreen A Screen which has childScreens
prevScreen The previous sibling in a childScreen array
screenType The ScreenType which created the Screen
screenTypeVersion The template version which created the Screen
silent If true, object is not read by screen reader
tabIndex tabIndex value of an object
timeline The Timeline object for a Screen

31. ScreenOutline

The Screen Outline pane

Methods

Name Args Description
copyScreenFromFile fileURI [, screenName] Inserts all Screens from specified URI
deleteScreen [screenName] Deletes a Screen
duplicateScreen [screenName] Duplicates a Screen
getSelectedScreens Returns an array of selected Screens
insertNestedScreen [name] [, referenceScreen] [, screenTypeName] Inserts a child screen
insertScreen [name] [, referenceScreen] [, screenTypeName] Adds a new Screen
moveScreen screenToMove, referenceScreen, position Relocates a Screen
renameScreen newScreenName [, oldScreenName] [, bDisplayError] Changes Screen's name
setCurrentScreen name Sets current screen
setScreenProperty property, value Sets specified property's value
setSelectedScreens selection, bReplaceCurrentSelection Selects one or more Screens

Properties

Name Description
currentScreen The focused Screen in the Screen Outline pane and on the Stage
screens An array of Screens

32. ScreenType

A single ScreenType

Methods

Name Args Description
closeWizardDialog Closes the prior wizard
getJSFLContext Calls a method defined within a Flash JavaScript document
invoke Invokes a ScreenType wizard
openWizardDialog Opens a ScreenType's wizard dialog

Properties

Name Description
name The name of the ScreenType
version The version of the ScreenType

33. Shape

Subclass of Element; represents a shape on the Stage

Methods

Name Args Description
beginEdit Defines the start of an edit session
deleteEdge index Deletes the specified Edge
endEdit Defines the end of an edit session

Properties

Name Description
contours An array of Contour objects
edges An array of Edge objects
isGroup Returns true if selected element is a group
vertices An array of Vertex objects

34. SoundItem

Subclass of Item; a sound in the Library

Properties

Name Description
bitRate MP3 compression bitrate
bits Type of ADPCM compression
compressionType Type of compression
convertStereoToMono If true, converts a stereo sound to mono
quality MP3 compression quality setting
sampleRate The sample rate
useImportedMP3Quality If true, the imported MP3 quality is used

35. Stroke

Stroke settings for the selection or the Toolbar

Properties

Name Description
breakAtCorners If true, enables the Sharp Corners setting in Custom Stroke dialog
color Stroke color
curve Specifies the curved setting; hatch line only
dash1 Length of solid part of dash
dash2 Length of space between dashes
density Density of stippled line
dotSize Dot size of stippled line
dotspace Spacing between dots of dotted line
hatchThickness Thickness of hatches in hatched line
jiggle Jiggle style of hatched line
length Length of hatches in hatched line
pattern Pattern of ragged line
rotate Rotation style of hatched line
space Length of spaces between hatches of a hatched line
style Stroke style setting
thickness Width of Stroke
variation Variation style of stippled line
waveHeight Wave style of ragged line

36. SymbolInstance

Subclass of Instance; a symbol instance on the Stage

Properties

Name Description
accName Name of an object, used by screen reader
actionScript String representing the ActionScript on an instance
buttonTracking Sets button options
colorAlphaAmount Reduces or increases tint and alpha values by a constant amount
colorAlphaPercent Reduces or increases tint and alpha values by percentage
colorBlueAmount Reduces or increases the blue tint by specified value
colorBluePercent Reduces or increases the blue tint by specified percentage
colorGreenAmount Reduces or increases the green tint by specified value
colorGreenPercent Reduces or increases the green tint by specified percentage
colorMode The color mode as identified in the Instance PI
colorRedAmount Reduces or increases the red tint by specified value
colorRedPercent Reduces or increases the red tint for selected instance by specified percentage
description Description of the object, used by screen reader
firstFrame Specifies which frame of a graphic symbol to display first
forceSimple If true, the children of the object are not accessible to screen reader
loop Specifies the loop setting for a graphic symbol
shortcut An object's shortcut key
silent If true, object is not read by screen reader
symbolType Specifies the symbol type of an instance
tabIndex tabIndex value of an object

37. SymbolItem

Subclass of Item; a symbol in the Library

Methods

Name Args Description
convertToCompiledClip Converts a symbol to a compiled clip
exportSWC outputURI Exports a symbol to a SWC
exportSWF outputURI Exports a symbol to a SWF

Properties

Name Description
sourceAutoUpdate If true, Shared Library symbol updates when published
sourceFilePath Source path for Shared Library symbol
sourceLibraryName Name of the symbol in source file
symbolType Specifies the symbol type
timeline The Timeine object for the symbol

38. Text

Subclass of Element; a text field on the Stage

Methods

Name Args Description
getTextAttr attrName [, startIndex] [, endIndex] Returns the specified text attribute
getTextString startIndex, endIndex Returns the text string contained in the specified range
setTextAttr attrName, attrValue [, startIndex] [, endIndex] Sets the specified text attribute
setTextString text [, startIndex] [, endIndex] Sets the text string within the text object

Properties

Name Description
accName Name of an object, used by screen reader
autoExpand If true, the bounding width expands to display all text
border If true, displays a border around dynamic or input text
description Description of the object, used by screen reader
embeddedCharacters Embeds all specified characters
embedRanges Specifies ranges of characters to embed
length The number of characters in a text object
lineType The type of text line
maxCharacters Specifies the maximum characters
orientation Specifies the orientation of the text
renderAsHTML If true, text renders as HTML
scrollable If true, text can be scrolled
selectable If true, text can be selected
selectionEnd Offset of the end of a text subselection
selectionStart Offset of the beginning of a text subselection
shortcut An object's shortcut key
silent If true, object is not read by screen reader
tabIndex tabIndex value of an object
textRuns An array of TextRun objects
textType The type of text field
useDeviceFonts If true, renders text using device font
variableName Stores the contents of text field in a variable name

39. TextAttrs

Subclass of TextRun; contains properties applicable to a subselection

Properties

Name Description
aliasText If true, text renders aliased
alignment Paragraph justification
autoKern If true, pair kerning is used
bold If true, text is displayed as bold
characterPosition The vertical position of text
characterSpacing Integer representing the space between characters
face The name of the font
fillColor A hexadecimal color string
indent Paragraph indentation
italic If true, text is displayed in italics
leftMargin A paragraph's left margin
lineSpacing A paragraph's line spacing
rightMargin A paragraph's right margin
rotation If true, characters are rotated 90 degrees
size The size of the font
target The string for the target
url A string representing an URL

40. TextRun

Subclass of Text; a string of characters

Properties

Name Description
characters The text contained in a TextRun object
textAttrs TextAttrs object containing the attributes of a run of text

41. Timeline

The Timeline

Methods

Name Args Description
addMotionGuide Adds a motion guide layer
addNewLayer [name] [, layerType] [, bAddAbove] Adds a new layer
clearFrames [startFrame] [, endFrame] Deletes all the contents from within a frame
clearKeyframes [startFrame] [, endFrame] Converts keyframe to a regular frame and deletes its contents
convertToBlankKeyframes [startFrame] [, endFrame] Converts specified frame to a blank keyframe
convertToKeyframes [startFrame] [, endFrame] Converts specified frames to keyframes
copyFrames [startFrame] [, endFrame] Copies specified frames to the clipboard
createMotionTween [startFrame] [, endFrame] Creates a motion tween, converts frame's contents into a symbol if it isn't one
cutFrames [startFrame] [, endFrame] Cuts specified frames to the clipboard
deleteLayer [index] Deletes layer in timeline
expandFolder bExpand [, bRecurseNestedParents] [, index] If true, expands layer folder; if false, collapses it
findLayerIndex name Returns an array of indices for Layers with specified name
getFrameProperty property Returns the specified Frame property
getLayerProperty property Returns the specified Layer property
getSelectedFrames Returns an array containing the indices of the selected Frames
getSelectedLayers Returns an array containing the indices of the selected Layers
insertBlankKeyframe [frameNum] Inserts a blank keyframe
insertFrames [numFrames] [, bAllLayers] [, frameNum] Inserts specified number of frames
insertKeyframe [frameNum] Inserts a keyframe
pasteFrames [startFrame] [, endFrame] Pastes frames from the clipboard into a range of frames
removeFrames [startFrame] [, endFrame] Deletes the frame
reorderLayer layerToMove, layerToPutItBy [, bAddBefore] Moves the specified layer
reverseFrames [startFrame] [, endFrame] Reverses a range of frames
selectAllFrames Selects all the frames in the current timeline
setFrameProperty property, value [, startFrame] [, endFrame] Sets the specified frame property
setLayerProperty property, value [, layersToChange] Sets the specified layer property
setSelectedFrames startFrame, endFrame [, bReplaceCurrentSelection] Selects specified frames in the current layer
setSelectedFrames selectionList [, bReplaceCurrentSelection] Selects the frames specified in the selection array
setSelectedLayers index [, bReplaceCurrentSelection] Selects specified layers and all the frames in those layers
showLayerMasking [layer] If true, displays layer masking

Properties

Name Description
currentFrame Frame index for the location of playhead
currentLayer The currently active layer
frameCount Number of frames in the longest layer in specified timeline
layerCount The number of layers in specified Timeline
layers An array of Layer objects
name Name of the Timeline; same as Scene name

42. ToolObj

Represents an individual tool

Methods

Name Args Description
enablePIControl control, enable Enables or disables a control in the PI
setIcon file Specifies PNG file to use as tool icon
setMenuString menuStr Sets the string for pop menu of tool
setOptionsFile xmlFIle Sets the options file for a tool
setPI pi Sets which PI to use with a tool
setToolName name Sets the name of the tool
setToolTip toolTip Sets the tooltip for the tool
showPIControl control, show Shows or hides specified control in the PI
showTransformHandles show If true, free transform handles are displayed when tool is active

Properties

Name Description
depth Location of the tool in popup menu
iconID Resource ID of the tool
position Location of the tool in toolbar

43. Tools

Records input from keyboard and mouse

Methods

Name Args Description
getKeyDown Returns the last key pressed
setCursor cursor Sets which cursor the tool uses

Properties

Name Description
activeTool Returns the ToolObj object for the currently active tool
altIsDown If TRUE, alt key is pressed
constrainPoint Allows Tools movements to be constrained
ctlIsDown If TRUE, control key is down
mouseIsDown If TRUE, left mouse button is pressed
penDownLoc The position of the last mouse down event
penLoc The current location of the mouse
shiftIsDown If TRUE, shift key is pressed
snapPoint If a snap setting is on, returns the point which snaps
toolObjs An array of ToolObj objects

44. Vertex

Contains the coordinate data of a shape

Methods

Name Args Description
getHalfEdge Returns the HalfEdge that shares a vertex
setLocation x, y Sets the location of a vertex

Properties

Name Description
x The x location of the vertex
y The y location of the vertex

45. VideoItem

Subclass of Item; a video in the Library

46. XMLUI

XMLUI dialog box

Methods

Name Args Description
accept Exits XMLUI dialog with an accept state
cancel Exits XMLUI dialog with a cancel state
get name Returns specified property's value in the XMLUI dialog box
set name, value Sets specified property's value in the XMLUI dialog box