flash object (fl)

Availability

Flash MX 2004.

Description

The flash object represents the Flash application. You can use flash or fl to refer to this object. This documentation uses fl in code samples throughout.

Method summary

The following methods can be used with the flash object:

Method

Description

fl.addEventListener()

Registers a function to be called when a specific event is received.

fl.browseForFileURL()

Opens a File Open or File Save system dialog box and lets the user specify a file to be opened or saved.

fl.browseForFolderURL()

Displays a Browse for Folder dialog box and lets the user select a folder.

fl.clipCopyString()

Copies the specified string to the Clipboard.

fl.closeAll()

Closes all open documents, displaying the Save As dialog box for any documents that were not previously saved.

fl.closeAllPlayerDocuments()

Closes all the SWF files that were opened with Control > Test Movie.

fl.closeDocument()

Closes the specified document.

fl.createDocument()

Opens a new document and selects it.

fl.downloadLatestVersion()

Downloads from the Version Cue server the latest version of a file that is not currently open.

fl.fileExists()

Checks whether a file already exists on disk.

fl.findDocumentDOM()

Lets you target a specific file by using its unique identifier.

fl.findDocumentIndex()

Returns an array of integers that represent the position of a document in the fl.documents array.

fl.findObjectInDocByName()

Exposes elements with instance names that match specified text.

fl.findObjectInDocByType()

Exposes elements of a specified element type in a document.

fl.getAppMemoryInfo()

Returns an integer that represents the number of bytes being used in a specified area of Flash.exe memory.

fl.getDocumentDOM()

Retrieves the DOM (Document object) of the currently active document.

fl.isFontInstalled()

Determines whether a specified font is installed.

fl.mapPlayerURL()

Maps an escaped Unicode URL to a UTF-8 or MBCS URL.

fl.openDocument()

Opens a Flash (FLA) document for editing in a new Flash Document window and gives it focus.

fl.openScript()

Opens a script (JSFL, AS, ASC) or other file (XML, TXT) in the Flash text editor.

fl.quit()

Quits Flash, prompting the user to save any changed documents.

fl.reloadTools()

Rebuilds the Tools panel from the toolconfig.xml file. Used only when creating extensible tools.

fl.removeEventListener()

Unregisters a function that was registered using fl.addEventListener().

fl.resetAS3PackagePaths()

Resets the global Classpath setting in the ActionScript 3.0 Settings dialog box to the default value.

fl.resetPackagePaths()

Resets the global Classpath setting in the ActionScript 2.0 Settings dialog box to the default value.

fl.revertDocumentToLastVersion()

Reverts the specified document to the version on the Version Cue server.

fl.runScript()

Executes a JavaScript file.

fl.saveAll()

Saves all open documents, displaying the Save As dialog box for any documents that were not previously saved.

fl.saveAVersionOfDocument()

Saves a version of the specified document to the Version Cue server.

fl.saveDocument()

Saves the specified document as a FLA document.

fl.saveDocumentAs()

Displays the Save As dialog box for the specified document.

fl.selectElement()

Enables selection or editing of an element.

fl.selectTool()

Selects the specified tool in the Tools panel.

fl.setActiveWindow()

Sets the active window to be the specified document.

fl.showIdleMessage()

Lets you disable the warning about a script running too long.

fl.synchronizeDocumentWithHeadVersion()

Synchronizes the specified document with the most current version on the Version Cue server.

fl.trace()

Sends a text string to the Output panel.

Property summary

The following properties can be used with the flash object.

Property

Description

fl.actionsPanel

Read-only; an actionsPanel object.

fl.as3PackagePaths

A string that corresponds to the global Classpath setting in the ActionScript 3.0 Settings dialog box.

fl.compilerErrors

Read-only; a compilerErrors object.

fl.componentsPanel

Read-only; a componentsPanel object, which represents the Components panel.

fl.configDirectory

Read-only; a string that specifies the full path for the local user’s Configuration folder as a platform-specific path.

fl.configURI

Read-only; a string that specifies the full path for the local user’s Configuration directory as a file:/// URI.

fl.contactSensitiveSelection

A Boolean value that specifies whether Contact Sensitive selection mode is enabled.

fl.createNewDocList

Read-only; an array of strings that represent the various types of documents that can be created.

fl.createNewDocListType

Read-only; an array of strings that represent the file extensions of the types of documents that can be created.

fl.createNewTemplateList

Read-only; an array of strings that represent the various types of templates that can be created.

fl.documents

Read-only; an array of Document objects (see Document object) that represent the documents (FLA files) that are currently open for editing.

fl.drawingLayer

Read-only; the drawingLayer object that an extensible tool should use when the user wants to temporarily draw while dragging.

fl.externalLibraryPath

A string that contains a list of items in the global ActionScript 3.0 External library path, which specifies the location of SWC files used as runtime shared libraries.

fl.flexSDKPath

A string that specifies the path to the Flex SDK folder, which contains bin, frameworks, lib, and other folders.

fl.libraryPath

A string that contains a list of items in the global ActionScript 3.0 Library path, which specifies the location of SWC files or folders containing SWC files.

fl.Math

Read-only; the Math object, which provides methods for matrix and point operations.

fl.mruRecentFileList

Read-only; an array of the complete filenames in the Most Recently Used (MRU) list that the Flash authoring tool manages.

fl.mruRecentFileListType

Read-only; an array of the file types in the MRU list that the Flash authoring tool manages.

fl.packagePaths

A string that corresponds to the global Classpath setting in the ActionScript 2.0 Settings dialog box.

fl.objectDrawingMode

An integer that represents the object drawing mode that is enabled.

fl.outputPanel

Read-only; reference to the outputPanel object.

fl.presetPanel

Read-only; a presetPanel object.

fl.scriptURI

Read-only; a string that represents the path of the currently running JSFL script, expressed as a file:/// URI.

fl.sourcePath

A string that contains a list of items in the global ActionScript 3.0 Source path, which specifies the location of ActionScript class files.

fl.swfPanels

An array of registered swfPanel objects (see swfPanel object).

fl.tools

Read-only; an array of Tools objects.

fl.version

Read-only; the long string version of the Flash authoring tool, including platform.

fl.xmlui

Read-only; an XMLUI object.