Interface FlashDocument

Index

Properties

Methods

Properties

public accName: string

public as3AutoDeclare: boolean

public as3Dialect: string

public as3ExportFrame: number

public as3StrictMode: boolean

public as3WarningsMode: boolean

public asVersion: number

public autoLabel: boolean

public backgroundColor: any

public currentPublishProfile: string

public currentTimeline: FlashTimeline

public description: string

public docClass: any

public forceSimple: boolean

public frameRate: number

public height: number

public id: number

public library: FlashLibrary

public livePreview: boolean

public name: number

public path: number

public publishProfiles: Array<string>

public selection: FlashElement[]

An array of the selected objects in the document.

public silent: boolean

A Boolean value that specifies whether the object

public timelines: FlashTimeline[]

Read-only; an array of Timeline objects (see

public viewMatrix: FlashMatrix

Read-only; a Matrix object.

public width: number

An integer that specifies the width of the document

public zoomFactor: number

Specifies the zoom percent of the Stage at author

Methods

public addDataToDocument(name: string, type: string, data: any)

Parameters

  • name: string
  • type: string
  • data: any

public addDataToSelection(name: string, type: string, data: any)

Parameters

  • name: string
  • type: string
  • data: any

public addFilter(filterName: string)

Parameters

  • filterName: string

public addItem(position: FlashPoint, item: FlashItem): boolean

Parameters

Returns

boolean

public addNewLine(startPoint: FlashPoint, endpoint: FlashPoint)

Parameters

public addNewOval(boundingRectangle: FlashRectangle, bSuppressFill?: boolean, bSuppressStroke?: boolean)

Parameters

  • boundingRectangle: FlashRectangle
  • bSuppressFill?: boolean optional
  • bSuppressStroke?: boolean optional

public addNewPrimitiveOval(boundingRectangle: FlashRectangle, bSpupressFill?: boolean, bSuppressStroke?: boolean)

Parameters

  • boundingRectangle: FlashRectangle
  • bSpupressFill?: boolean optional
  • bSuppressStroke?: boolean optional

public addNewPrimitiveRectangle(boundingRectangle: FlashRectangle, roundness: number, bSuppressFill?: boolean, bSuppressStroke?: boolean): any

Parameters

  • boundingRectangle: FlashRectangle
  • roundness: number
  • bSuppressFill?: boolean optional
  • bSuppressStroke?: boolean optional

Returns

any

public addNewPublishProfile(profileName?: string)

Parameters

  • profileName?: string optional

public addNewRectangle(boundingRectangle: FlashRectangle, roundness: number, bSuppressFill?: boolean, bSuppressStroke?: boolean): any

Parameters

  • boundingRectangle: FlashRectangle
  • roundness: number
  • bSuppressFill?: boolean optional
  • bSuppressStroke?: boolean optional

Returns

any

public addNewScene(name: string): boolean

Parameters

  • name: string

Returns

boolean

public addNewText(boundingRectangle: FlashRectangle, text?: string)

Parameters

public align(alignmode: string, bUseDocumentBounds?: boolean): any

Parameters

  • alignmode: string
  • bUseDocumentBounds?: boolean optional

Returns

any

public allowScreens()

public arrange(arrangeMode: string)

Arranges the selection on the Stage. "back", "backward", "forward", and "front"

Parameters

  • arrangeMode: string

public breakApart()

Performs a break-apart operation on the current

public canEditSymbol(): boolean

Indicates whether the Edit Symbols menu and

Returns

boolean

public canRevert(): boolean

Determines whether you can use the

Returns

boolean

public canTestMovie(): boolean

Determines whether you can use the

Returns

boolean

public canTestScene(): boolean

Determines whether you can use the

Returns

boolean

public changeFilterOrder(oldIndex: number, newIndex: number)

Changes the index of the filter in the Filter list.

Parameters

  • oldIndex: number
  • newIndex: number

public clipCopy()

Copies the current selection from the document

public clipCut()

Cuts the current selection from the document

public clipPaste(bInPlace?: boolean)

Pastes the contents of the Clipboard into the document.

Parameters

  • bInPlace?: boolean optional

public close(bPromptToSaveChanges?: boolean)

Closes the specified document.

Parameters

  • bPromptToSaveChanges?: boolean optional

public convertLinesToFills()

Converts lines to fills on the selected objects.

public convertToSymbol(type: string, name: string, registrationPoint: string): FlashSymbolInstance

Converts the selected Stage item(s) to a new

Parameters

  • type: string
  • name: string
  • registrationPoint: string

Returns

FlashSymbolInstance

public crop()

Uses the top selected drawing object to crop all

public debugMovie(abortIfErrorsExist?: boolean)

Method; Invokes the Debug Movie command on the document.

Parameters

  • abortIfErrorsExist?: boolean optional

public deleteEnvelope(): boolean

Deletes the envelope (bounding box that

Returns

boolean

public deletePublishProfile(): boolean

Deletes the currently active profile, if there is

Returns

boolean

public deleteScene(): boolean

Deletes the current scene (Timeline object), and

Returns

boolean

public deleteSelection()

Deletes the current selection on the Stage.

public disableAllFilters()

Disables all filters on the selected objects.

public disableFilter(filterIndex: number)

Disables the specified filter in the Filters list.

Parameters

  • filterIndex: number

public disableOtherFilters(enabledFilterIndex: number)

Disables all filters except the one at the specified

Parameters

  • enabledFilterIndex: number

public distribute(distributemode: string, bUseDocumentBounds?: boolean)

Distributes the selection.

Parameters

  • distributemode: string
  • bUseDocumentBounds?: boolean optional

public distributeToLayers()

Performs a distribute-to-layers operation on the

public documentHasData(name: string): boolean

Checks the document for persistent data with the

Parameters

  • name: string

Returns

boolean

public duplicatePublishProfile(profileName?: string): number

Duplicates the currently active profile and gives

Parameters

  • profileName?: string optional

Returns

number

public duplicateScene(): boolean

Makes a copy of the currently selected scene,

Returns

boolean

public duplicateSelection()

Duplicates the selection on the Stage.

public editScene(index: number)

Makes the specified scene the currently selected

Parameters

  • index: number

public enableAllFilters()

Enables all the filters on the Filters list for the

public enableFilter(filterIndex: number)

Enables the specified filter for the selected

Parameters

  • filterIndex: number

public enterEditMode(editMode?: string)

Switches the authoring tool into the editing mode

Parameters

  • editMode?: string optional

public exitEditMode()

Exits from symbol-editing mode and returns

public exportPNG(fileURI: string, bCurrentPNGSettings?: boolean, bCurrentFrame?: boolean): boolean

Exports the document as one or more PNG files.

Parameters

  • fileURI: string
  • bCurrentPNGSettings?: boolean optional
  • bCurrentFrame?: boolean optional

Returns

boolean

public exportPublishProfile(fileURI: string)

Exports the currently active profile to an XML

Parameters

  • fileURI: string

public exportPublishProfileString(profileName?: string): string

returns a string that specifies, in XML format, the specified profile. If you don't pass a value for profileName, the current profile is exported.

Parameters

  • profileName?: string optional

Returns

string

public exportSWF(fileURI: string, bCurrentSettings?: boolean)

Exports the document in the Flash SWF format.

Parameters

  • fileURI: string
  • bCurrentSettings?: boolean optional

public getAlignToDocument(): boolean

Identical to retrieving the value of the To Stage

Returns

boolean

public getBlendMode(): string

Returns a string that specifies the blending mode

Returns

string

public getCustomFill(objectToFill?: string): FlashFill

Retrieves the fill object of the selected shape, or

Parameters

  • objectToFill?: string optional

Returns

FlashFill

public getCustomStroke(locationOfStroke?: string): FlashStroke

Returns the stroke object of the selected shape,

Parameters

  • locationOfStroke?: string optional

Returns

FlashStroke

public getDataFromDocument(name: string): any

Retrieves the value of the specified data.

Parameters

  • name: string

Returns

any

public getElementProperty(propertyName: string): any

Gets the specified Element property for the

Parameters

  • propertyName: string

Returns

any

public getElementTextAttr(attrName: string, startIndex?: number, endIndex?: number): FlashTextAttrs

Gets a specified TextAttrs property of the

Parameters

  • attrName: string
  • startIndex?: number optional
  • endIndex?: number optional

Returns

FlashTextAttrs

public getFilters(): FlashFilter[]

Returns an array that contains the list of filters

Returns

FlashFilter[]

public getMetadata(): string

Returns a string containing the XML metadata

Returns

string

public getMobileSettings(): string

returns the mobile XML settings for the document.

Returns

string

public getPlayerVersion(): string

Returns a string that represents the targeted

Returns

string

public getSelectionRect(): FlashRectangle

Gets the bounding rectangle of the current

Returns

FlashRectangle

public getTextString(startIndex?: number, endIndex?: number): string

Gets the currently selected text.

Parameters

  • startIndex?: number optional
  • endIndex?: number optional

Returns

string

public getTimeline(): FlashTimeline

Retrieves the current Timeline object in the

Returns

FlashTimeline

public getTransformationPoint(): FlashPoint

gets the location of the transformation point of the current selection. You can use the transformation point for commutations such as rotate and skew.

Returns

FlashPoint

public group()

Converts the current selection to a group.

public importFile(fileURI: string, importToLibrary?: boolean)

Imports a file into the document.

Parameters

  • fileURI: string
  • importToLibrary?: boolean optional

public importPublishProfile(fileURI: string): number

Imports a profile from a file.

Parameters

  • fileURI: string

Returns

number

public importPublishProfileString(xmlString: string): number

imports an XML string that represents a publish profile and sets it as the current profile. To generate an XML string to import, use document.exportPublishProfileString() before using this method.

Parameters

  • xmlString: string

Returns

number

public importSWF(fileURI: string)

Imports a SWF file into the document.

Parameters

  • fileURI: string

public intersect(): boolean

creates an intersection drawing object from all selected drawing objects. This method returns false if there are no drawing objects selected, or if any of the selected items are not drawing objects.

Returns

boolean

public loadCuepointXML(uri: string): Array<any>

loads a cue point XML file. The format and DTD of the XML file is the same as the one imported and exported by the Cue Points Property inspector. The return value is the same as the string serialized in the Cue Point property of the object containing the instance of an FLVPlayback Component.

Parameters

  • uri: string

Returns

Array<any>

public match(bWidth: boolean, bHeight: boolean, bUseDocumentBounds?: boolean)

Makes the size of the selected objects the same.

Parameters

  • bWidth: boolean
  • bHeight: boolean
  • bUseDocumentBounds?: boolean optional

public mouseClick(position: FlashPoint, bToggleSel: boolean, bShiftSel: boolean)

Performs a mouse click from the Selection tool.

Parameters

  • position: FlashPoint
  • bToggleSel: boolean
  • bShiftSel: boolean

public mouseDblClk(position: FlashPoint, bAltDown: boolean, bShiftDown: boolean, bShiftSelect: boolean)

Performs a double mouse click from the

Parameters

  • position: FlashPoint
  • bAltDown: boolean
  • bShiftDown: boolean
  • bShiftSelect: boolean

public moveSelectedBezierPointsBy(delta: FlashPoint)

If the selection contains at least one path with at

Parameters

public moveSelectionBy(distanceToMove: FlashPoint)

Moves selected objects by a specified distance.

Parameters

public optimizeCurves(smoothing: number, bUseMultiplePasses: boolean)

Optimizes smoothing for the current selection,

Parameters

  • smoothing: number
  • bUseMultiplePasses: boolean

public publish()

Publishes the document according to the active

public punch(): boolean

uses the top selected drawing object to punch through all selected drawing objects underneath it. This method returns false if there are no drawing objects selected or if any of the selected items are not drawing objects.

Returns

boolean

public removeAllFilters()

Removes all filters from the selected object(s).

public removeDataFromDocument(name: string)

Removes persistent data with the specified

Parameters

  • name: string

public removeDataFromSelection(name: string)

Removes persistent data with the specified

Parameters

  • name: string

public removeFilter(filterIndex: number)

Removes the specified filter from the Filters list

Parameters

  • filterIndex: number

public renamePublishProfile(profileNewName?: string): boolean

Renames the current profile.

Parameters

  • profileNewName?: string optional

Returns

boolean

public renameScene(name: string): boolean

Renames the currently selected scene in the

Parameters

  • name: string

Returns

boolean

public reorderScene(sceneToMove: number, sceneToPutItBefore: number)

Moves the specified scene before another

Parameters

  • sceneToMove: number
  • sceneToPutItBefore: number

public resetOvalObject()

Sets all values in the Property inspector to

public resetRectangleObject()

Sets all values in the Property inspector to

public resetTransformation()

Resets the transformation matrix; equivalent to

public revert()

Method; reverts the specified document to its previously saved version. This method is equivalent to selecting File > Revert.

public rotate3DSelection(xyzCoordinate: FlashPoint3D, bGlobalTransform: boolean)

applies a 3D rotation to the selection. This method is available only for movie clips.

Parameters

public rotateSelection(angle: number, rotationPoint?: string)

Rotates the selection by a specified number of

Parameters

  • angle: number
  • rotationPoint?: string optional

public save(bOkToSaveAs?: boolean): boolean

Saves the document in its default location;

Parameters

  • bOkToSaveAs?: boolean optional

Returns

boolean

public saveAndCompact(bOkToSaveAs?: boolean): boolean

saves and compacts the file. This method is equivalent to selecting File > Save and Compact.

Parameters

  • bOkToSaveAs?: boolean optional

Returns

boolean

public scaleSelection(xScale: number, yScale: number, whichCorner?: string)

Scales the selection by a specified amount;

Parameters

  • xScale: number
  • yScale: number
  • whichCorner?: string optional

public selectAll()

Selects all items on the Stage; equivalent to

public selectNone()

Deselects any selected items.

public setAlignToDocument(bToStage?: boolean)

Sets the preferences for document.align(),

Parameters

  • bToStage?: boolean optional

public setBlendMode(mode: string)

Sets the blending mode for the selected objects.

Parameters

  • mode: string

public setCustomFill(fill: FlashFill)

Sets the fill settings for the Tools panel, Property

Parameters

public setCustomStroke(stroke: FlashStroke)

Sets the stroke settings for the Tools panel,

Parameters

public setElementProperty(property: string, value: number)

Sets the specified Element property on selected

Parameters

  • property: string
  • value: number

public setElementTextAttr(attrName: string, attrValue: FlashTextAttrs, startIndex?: number, endIndex?: number): boolean

Sets the specified TextAttrs property of the

Parameters

  • attrName: string
  • attrValue: FlashTextAttrs
  • startIndex?: number optional
  • endIndex?: number optional

Returns

boolean

public setFillColor(color: any)

Changes the fill color of the selection to the

Parameters

  • color: any

public setFilterProperty(property: string, filterIndex: number, value: any)

Sets a specified filter property for the currently

Parameters

  • property: string
  • filterIndex: number
  • value: any

public setFilters(filterArray: FlashFilter[])

Applies filters to the selected objects .

Parameters

public setInstanceAlpha(opacity: number)

Sets the opacity of the instance.

Parameters

  • opacity: number

public setInstanceBrightness(brightness: number)

Sets the brightness for the instance.

Parameters

  • brightness: number

public setInstanceTint(color: any, strength: number)

Sets the tint for the instance.

Parameters

  • color: any
  • strength: number

public setMetadata(strMetadata: string): boolean

Sets the XML metadata for the specified

Parameters

  • strMetadata: string

Returns

boolean

public setMobileSettings(xmlString: string): boolean

Sets the value of an XML settings string in a

Parameters

  • xmlString: string

Returns

boolean

public setOvalObjectProperty(propertyName: string, value: any)

Specifies a value for a specified property of

Parameters

  • propertyName: string
  • value: any

public setPlayerVersion(version: string): boolean

Sets the version of the Flash Player targeted by

Parameters

  • version: string

Returns

boolean

public setRectangleObjectProperty(propertyName: string, value: any)

Specifies a value for a specified property of

Parameters

  • propertyName: string
  • value: any

public setSelectionBounds(boundingRectangle: FlashRectangle, bContactSensitiveSelection?: boolean)

Moves and resizes the selection in a single

Parameters

  • boundingRectangle: FlashRectangle
  • bContactSensitiveSelection?: boolean optional

public setSelectionRect(rect: FlashRectangle, bReplaceCurrentSelection?: boolean, bContactSensitiveSelection?: boolean)

Draws a rectangular selection marquee relative

Parameters

  • rect: FlashRectangle
  • bReplaceCurrentSelection?: boolean optional
  • bContactSensitiveSelection?: boolean optional

public setStageVanishingPoint(point: FlashPoint)

Specifies the vanishing point for viewing 3D objects.

Parameters

public setStageViewAngle(angle: number)

Parameters

  • angle: number

public setStroke(color: any, size: number, strokeType: string)

Sets the color, width, and style of the selected

Parameters

  • color: any
  • size: number
  • strokeType: string

public setStrokeColor(color: any)

Changes the stroke color of the selection to the

Parameters

  • color: any

public setStrokeSize(size: number)

Changes the stroke size of the selection to the

Parameters

  • size: number

public setStrokeStyle(strokeType: string)

Changes the stroke style of the selection to the

Parameters

  • strokeType: string

public setTextRectangle(boundingRectangle: FlashRectangle): boolean

Changes the bounding rectangle for the selected

Parameters

Returns

boolean

public setTextSelection(startIndex: number, endIndex: number): boolean

Sets the text selection of the currently selected

Parameters

  • startIndex: number
  • endIndex: number

Returns

boolean

public setTextString(text: string, startIndex?: number, endIndex?: number): boolean

Inserts a string of text.

Parameters

  • text: string
  • startIndex?: number optional
  • endIndex?: number optional

Returns

boolean

public setTransformationPoint(transformationPoint: FlashPoint)

Moves the transformation point of the current

Parameters

public skewSelection(xSkew: number, ySkew: number, whichEdge?: string)

Skews the selection by a specified amount.

Parameters

  • xSkew: number
  • ySkew: number
  • whichEdge?: string optional

public smoothSelection()

Smooths the curve of each selected fill outline or

public space(direction: string, bUseDocumentBounds?: boolean)

Spaces the objects in the selection evenly.

Parameters

  • direction: string
  • bUseDocumentBounds?: boolean optional

public straightenSelection()

Straightens the currently selected strokes;

public swapElement(name: string)

Swaps the current selection with the specified

Parameters

  • name: string

public swapStrokeAndFill()

Swaps the Stroke and Fill colors.

public testMovie()

Executes a Test Movie operation on the

public testScene()

Executes a Test Scene operation on the current

public traceBitmap(threshold: number, minimumArea: number, curveFit: string, cornerThreshold: string)

Performs a trace bitmap on the current selection;

Parameters

  • threshold: number
  • minimumArea: number
  • curveFit: string
  • cornerThreshold: string

public transformSelection(a: number, b: number, c: number, d: number)

Parameters

  • a: number
  • b: number
  • c: number
  • d: number

public unGroup()

public union()

public unlockAllElements()

public xmlPanel(fileURI: string): any

Parameters

  • fileURI: string

Returns

any