Skip to content

Latest commit

 

History

History
85 lines (71 loc) · 18 KB

File metadata and controls

85 lines (71 loc) · 18 KB

fl summary

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.addToolInToolbar() Add the specified tool from master toolbar to main toolbar, appends in the last.
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.clearPublishCache() Clears the publish cache.
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.copyLibraryItem() Silently copies a library item from a document without exposing the item in the Flash Pro user interface.
fl.createDocument() Opens a new document and selects it.
fl.exportPublishProfileString() Uniform Resource Identifier (URI) from which to export publish settings.
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.
MethodDescription
fl.getSwfPanel()Returns the SWFPanel object based on the panel's localized name or its SWF filename.
fl.getThemeColor()Retrieves a theme color that matches the parameter specified theme parameter name.
fl.getThemeColorParameters()Retrieves an array of theme parameter names.
fl.getThemeFontInfo()Return either the font style or the font size that is used to draw the UI of the specified size.
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.reloadEffects() - droppedDropped in Adobe Animate.
fl.reloadTools()Rebuilds the Tools panel from the toolconfig.xml file.
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() - droppedDropped in Adobe Animate.
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.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.setPrefBoolean()Sets a boolean preference value.
fl.showIdleMessage()Lets you disable the warning about a script running too long.
fl.toggleBreakpoint()Toggles a breakpoint for the given .as file at the given line.
fl.trace()Sends a text string to the Output panel.
fl.xmlPanel()Launches the XML To UI dialog from a URI that points to an XML-format file.
fl.xmlPanelFromString()Launches the XML To UI dialog from an XML-format string.

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 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.installedPlayers Returns an array of generic objects corresponding to the list of installed Flash Players in the document Property inspector.
fl.languageCode Returns the five character code identifying the locale of the application’s user interface.
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 - dropped Dropped in Adobe Animate.
fl.publishCacheDiskSizeMax An integer that sets the disk cache size limit preference.
fl.publishCacheEnabled A boolean value that sets whether publish cache is enabled.
fl.publishCacheMemoryEntrySizeLimit An integer property that sets the maximum size for the memory cache entry preference.
Property Description
fl.publishCacheMemorySizeMax An integer that sets the memory cache size limit preference.
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.spriteSheetExporter Returns an instance of SpriteSheetExporter object.
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.