Macromedia Flash MX 2004 - Flash Javascript Dictionary
|
|
Bookmark Macromedia Flash MX 2004 - Flash Javascript Dictionary |
Here you can find all about Macromedia Flash MX 2004 - Flash Javascript Dictionary like manual and other informations. For example: review.
Macromedia Flash MX 2004 - Flash Javascript Dictionary manual (user guide) is ready to download for free.
On the bottom of page users can write a review. If you own a Macromedia Flash MX 2004 - Flash Javascript Dictionary please write about it to help other people. [ Report abuse or wrong photo | Share your Macromedia Flash MX 2004 - Flash Javascript Dictionary photo ]
Manual
Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Download
(English)Macromedia Flash MX 2004-flash Javascript Dictionary, size: 3.0 MB |
Macromedia Flash MX 2004 - Flash Javascript Dictionary
User reviews and opinions
| cheap hydrocodone19 |
3:40am on Sunday, October 10th, 2010 ![]() |
| awesome I first heard of Flash MX from one of my friends at school and thought, i gotta have this product! | |
Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.
Documents

bitmapItem.allowSmoothing
Description Property; a Boolean value. Set to true to allow smoothing of a bitmap; false otherwise. Property; a string that determines the type of image compression applied to the bitmap. Property; an iinteger that specifies the quality of the bitmap
bitmapItem.compressionType
bitmapItem.quality
bitmapItem.useImportedJPEGQuality Property; a Boolean value. To use the default imported JPEG quality, specify true; false otherwise.
Usage bitmapItem.allowSmoothing Description
Property; a Boolean value. Set to true to allow smoothing of a bitmap; false otherwise.
The following code sets the allowSmoothing property of the first item in the library of the current document to true:
fl.getDocumentDOM().library.items[0].allowSmoothing = true; alert(fl.getDocumentDOM().library.items[0].allowSmoothing);
Usage bitmapItem.compressionType Description
Property; a string that determines the type of image compression applied to the bitmap. Acceptable values are "photo" or "lossless". If bitmapItem.useImportedJPEGQuality is false, "photo" corresponds to JPEG using a quality from 0 to 100; if bitmapItem.useImportedJPEGQuality is true, "photo" corresponds to JPEG using the default document quality value. The value "lossless" corresponds to GIF or PNG formats.
The following code sets the compressionType property of the first item in the library of the current document to "photo":
fl.getDocumentDOM().library.items[0].compressionType = "photo"; alert(fl.getDocumentDOM().library.items[0].compressionType);
Usage bitmapItem.quality Description
Property; an integer that specifies the quality of the bitmap. To use the default document quality, specify -1; otherwise, specify an integer from 0 to 100. Available only for JPEG compression.
The following code sets the quality property of the first item in the library of the current document to 65:
The following example changes the selected publish profile to "Default":
fl.getDocumentDOM().currentPublishProfile = "Default";
Usage document.currentTimeline Description
Property; an integer that specifies the index of the active Timeline. You can set the active Timeline by changing the value of this property; the effect is almost equivalent to calling document.editScene(). The only difference is that you dont get an error message if the index of the Timeline is not valid (the property is simply not set, which causes silent failure). See document.getTimeline().
The following example displays the index of the current Timeline.
var myCurrentTL = fl.getDocumentDOM().currentTimeline; fl.trace("The index of the current timeline is: "+ myCurrentTL);
The following example changes the active Timeline from the main Timeline to a scene named "myScene".
var i = 0; var curTimelines = fl.getDocumentDOM().timelines; while(i < fl.getDocumentDOM().timelines.length){ if(curTimelines[i].name == "myScene"){ fl.getDocumentDOM().currentTimeline = i; }
++i; }
document.deletePublishProfile()
Usage document.deletePublishProfile() Parameters
An integer that is the index of the new current profile. If a new profile is not available, the method leaves the current profile unchanged and returns its index.
Method; deletes the currently active profile, if there is more than one. There must be at least one profile left. See document.addNewPublishProfile().
The following example deletes the currently active profile, if there is more than one, and displays the index of the new currently active profile:
alert(fl.getDocumentDOM().deletePublishProfile());
Usage document.deleteScene() Parameters
A Boolean value: true if the scene is successfully deleted; false otherwise.
Method; deletes the current scene (Timeline object) and, if the deleted scene was not the last one, sets the next scene as the current Timeline object. If the deleted scene was the last one, it sets the first object as the current Timeline object. If only one Timeline object (scene) exists, it returns the value false.
Assuming there are three scenes (Scene0, Scene1, and Scene2) in the current document, the following example makes Scene2 the current scene and then deletes it:
fl.getDocumentDOM().editScene(2); var success = fl.getDocumentDOM().deleteScene();
whichCorner A string value that specifies the edge about which the transformation occurs. If omitted, scaling occurs about the transformation point. Acceptable values are: "bottom left", "bottom right", "top right", "top left", "top center", "right center", "bottom center", and "left center". This parameter is optional. Returns
Method; scales the selection by a specified amount. This method is equivalent to using the Free Transform tool to scale the object.
The following example expands the width of the current selection to double the original width and shrinks the height to half:
flash.getDocumentDOM().scaleSelection(2.0, 0.5);
The following example flips the selection vertically:
fl.getDocumentDOM().scaleSelection(1, -1);
The following example flips the selection horizontally:
fl.getDocumentDOM().scaleSelection(-1, 1);
The following example scales the selection vertically by 1.9 from the top center:
fl.getDocumentDOM().scaleSelection(1, 1.90, 'top center');
Usage document.screenOutline Description
Read-only property; the current ScreenOutline object for the document. Before accessing the object for the first time, make sure to use document.allowScreens() to determine whether the property exists.
The following example displays the array of values in the screenOutline property:
var myArray = new Array(); for(var i in fl.getDocumentDOM().screenOutline) {
myArray.push(" "+i+" : "+fl.getDocumentDOM().screenOutline[i]) ; } fl.trace("Here is the property dump for screenOutline:: "+myArray);
Usage document.selectAll() Parameters
Method; selects all items on the Stage. This method is equivalent to pressing Control+A (Windows) or Command+A (Macintosh) or selecting Edit > Select All. See document.selectNone() and document.selection.
The following example selects everything that is currently visible to the user:
fl.getDocumentDOM().selectAll();
document.selection
Usage document.selection Description
Property; an array of the selected objects in the document. If nothing is selected, returns an array of length zero. If no document is open, returns null. To add objects to the array, you must first select them in one of the following ways:
Manually select object(s) on the Stage. Use one of the selection methods, such as document.setSelectionRect(),
//begin loop through the elements on a layer for(var c=0; c < theElems.length; c++){ //checks to see if the element is of type "instance" if(theElems[c].elementType == "instance"){ //if the element is an instance, it checks if it is an instance of "myMovieClip" if(theElems[c].libraryItem.name == "myMovieClip"){ //assigns elements that are instances of "myMovieClip" to "mySelectionArray" mySelectionArray[x] = theElems[c]; //increments counter variable x++; } } } }
// Now that we have assigned all the instances of "myMovieClip" // to "mySelectionArray", we then set the document.selection array // equal to mySelectionArray. This selects the objects on stage. fl.getDocumentDOM().selection = mySelectionArray;
document.selectNone()
Usage document.selectNone() Parameters
Method; deselects any selected items. See document.selection and document.selectAll().
The following example deselects any items that are selected:
fl.getDocumentDOM().selectNone();
document.setAlignToDocument()
Usage document.setAlignToDocument( bToStage ) Parameters bToStage
A Boolean value that, if set to true, aligns objects to the Stage. If set to false, it
does not.
Method; sets the preferences for document.align(), document.distribute(), document.match(), and document.space() to act on the document. This method is equivalent to enabling the To Stage button in the Align panel. See document.getAlignToDocument().
The following example enables the To Stage button in the Align panel to align objects with the Stage:
fl.getDocumentDOM().setAlignToDocument(true);
Usage document.setCustomFill( fill ) Parameters fill Returns
Sets the Fill object.
Method; sets the fill settings for the toolbar, Property inspector, and any selected shapes. This allows a script to set the fill settings before drawing the object, rather than drawing the object, selecting it, and changing the fill settings. It also lets a script change the toolbar and Property inspector fill settings. See document.getCustomFill().
The following example changes the color of the fill color swatch in the toolbar, Property inspector, and any selected shapes to white:
Usage document.setCustomStroke( stroke ) Parameters stroke Returns
A Stroke object.
Method; sets the stroke settings for the toolbar, Property inspector, and any selected shapes. This allows a script to set the stroke settings before drawing the object, rather than drawing the object, selecting it, and changing the stroke settings. It also lets a script change the toolbar and Property inspector stroke settings. See document.getCustomStroke().
The following example changes the stroke thickness setting in the toolbar, Property inspector, and any selected shapes:
var stroke = fl.getDocumentDOM().getCustomStroke(); stroke.thickness += 2; fl.getDocumentDOM().setCustomStroke(stroke);
Usage document.setElementProperty( property, value ) Parameters property
A string that specifies the name of the Element property to set. For a complete list of properties and values, see Property summary for the Element object on page 149.
Note: You cant use this method to set values for read-only properties, such as element.elementType, element.top, and element.left. value Returns
Specifies the value to set in the specified Element property.
Method; sets the specified Element property on selected object(s) in the document. This method does nothing if there is no selection.
The following example sets the width of all selected objects to 100 and the height to 50:
fl.getDocumentDOM().setElementProperty("width", 100); fl.getDocumentDOM().setElementProperty("height", 50);
Usage document.setElementTextAttr( attrName, attrValue [, startIndex [, endIndex]] ) Parameters attrName attrValue
A string that specifies the name of the TextAttrs property to change.
The value to which to set the TextAttrs property. For a list of property names and expected values, see Property summary for the TextAttrs object on page 299. An integer value that specifies the index of the first character that is affected. This parameter is optional.
startIndex
endIndex
An integer value that specifies the index of the last character that is affected. This parameter is optional.
A Boolean value: true if at least one text attribute property is changed; false otherwise.
Method; sets the specified textAttrs property of the selected text items to the specified value. For a list of property names and allowable values, see Property summary for the TextAttrs object on page 299. If the optional parameters are not passed, the method sets the style of the currently selected text range, or the whole text field if no text is selected. If only startIndex is passed, the method sets that characters attributes. If startIndex and endIndex are passed, the method sets the attributes on the characters starting from startIndex up to, but not including, endIndex. If paragraph styles are specified, all the paragraphs that fall within the range are affected.
The following examples set the fillColor, italic, and bold text attributes for the selected text items:
var success = fl.getDocumentDOM().setElementTextAttr("fillColor", "#00ff00"); var pass = fl.getDocumentDOM().setElementTextAttr("italic", true, 10); var ok = fl.getDocumentDOM().setElementTextAttr("bold", true, 5, 15);
Usage document.setFillColor( color ) Parameters color A color string in hexadecimal #rrggbb format (where r is red, g is green, and b is blue), a hexidecimal color value (such as, 0xff0000), or an integer color value. If set to null, no fill color is set, which is the same as setting the Fill color swatch in the user interface to no fill. Returns
Method; changes the fill color of the selection to the specified color. For information on changing the fill color in the toolbar and Property inspector, see document.setCustomFill().
The first three statements in the following example set the fill color using each of the different formats for specifying color. The fourth statement sets the fill to no fill.
flash.getDocumentDOM().setFillColor("#cc00cc"); flash.getDocumentDOM().setFillColor(0xcc00cc); flash.getDocumentDOM().setFillColor(120000); flash.getDocumentDOM().setFillColor(null);
document.setInstanceAlpha()
Usage document.setInstanceAlpha( opacity ) Parameters opacity An integer between 0 (transparent) and 100 (completely saturated) that adjusts the transparency of the instance.
Methods; sets the opacity of the instance.
The following example sets the opacity of the tint to a value of 50:
fl.getDocumentDOM().setInstanceAlpha(50);
document.setInstanceBrightness()
Usage document.setInstanceBrightness( brightness ) Parameters brightness Returns
An integer that specifies brightness as a value from -100 (black) to 100 (white).
Method; sets the brightness for the instance.
The following example sets the brightness for the instance to a value of 50:
fl.getDocumentDOM().setInstanceBrightness(50);
document.setInstanceTint()
Usage document.setInstanceTint( color, strength ) Parameters color A color string in hexadecimal #rrggbb format (where r is red, g is green, and b is blue), a hexidecimal color value (such as, 0xff0000), or an integer color value that specifies the color of the tint. This parameter is equivalent to picking the Color: Tint value for a symbol in the Property Inspector. strength
An integer between 0 and 100 that specifies the opacity of the tint.
Method; sets the tint for the instance.
The following example sets the tint for the selected instance to red with an opacity value of 50:
fl.getDocumentDOM().setInstanceTint(0xff0000, 50);
document.setSelectionBounds()
Usage document.setSelectionBounds( boundingRectangle ) Parameters
fl.getDocumentDOM().library.selectItem("untitled Folder_1/Symbol_1", true, false);
library.selectNone()
Method; deselects all the library items.
fl.getDocumentDOM().library.selectNone(); fl.getDocumentDOM().library.selectAll(false);
library.setItemProperty()
Usage library.setItemProperty( property, value ) Parameters property
A string that is the name of the property to set. For a list of properties, see the Property summary for the Item object and property summaries for its subclasses. To see which objects are subclasses of the Item object, see Summary of the DOM structure. The value to assign to the specified property.
value Returns
Method; sets the property for all selected library items (ignoring folders).
The following example assigns the value button to the symbolType property for the selected library item or items. In this case, the item must be a SymbolItem object; symbolType is a valid property for SymbolItem objects.
fl.getDocumentDOM().library.setItemProperty("symbolType", "button");
Usage library.updateItem( [ namePath ] ) Parameters namePath
A string that specifies the name of the item. If the item is in a folder, specify its name and path using slash notation. This is the same as right-clicking on an item and selecting Update from the menu in the UI. If no name is provided, the current selection is updated. This parameter is optional.
A Boolean value: true if Flash updated the item successfully; false otherwise.
Method; updates the specified item.
The following example displays a dialog box that shows whether the currently selected item is updated (true) or not (false):
alert(fl.getDocumentDOM().library.updateItem());
LinkedVideoInstance object
Element object > Instance object > LinkedVideoInstance object
The LinkedVideoInstance object is a subclass of the Instance object. There are no unique methods or properties of LinkedVideoInstance.
See matrix.a. matrix.tx
Usage matrix.tx Description
Property; a floating-point value that specifies the x-axis location of a symbols registration point or the center of a shape. It defines the x translation of the transformation. You can move an object by setting the matrix.tx and matrix.ty properties.
In the following example, setting tx and ty to 0 moves the registration point of the object to point 0,0 in the document:
var mat = fl.getDocumentDOM().selection[0].matrix; mat.tx = 0; mat.ty = 0; fl.getDocumentDOM().selection[0].matrix = mat;
Usage matrix.ty
Property; a floating-point value that specifies the y-axis location of a symbols registration point or the center of a shape. It defines the y translation of the transformation. You can move an object by setting the matrix.tx and matrix.ty properties.
See the matrix.tx example.
outputPanel object
This object represents the Output panel, which displays troubleshooting information such as syntax errors. To access this object, use fl.outputPanel (or flash.outputPanel). Method summary for the outputPanel object The outputPanel object uses the following methods.
outputPanel.clear() outputPanel.save()
Description Method; clears the contents of the Output panel. Method; saves the contents of the Output panel to a local text file, in UTF-8 encoding. Method; adds a line to the contents of the Output panel, terminated by a new line.
outputPanel.trace()
outputPanel.clear()
Usage outputPanel.clear() Parameters
Method; clears the contents of the Output panel. You can use this method in a batch processing application to clear a list of errors, or to save them incrementally by using this method with outputPanel.save().
The following example clears the current contents of the Output panel:
fl.outputPanel.clear();
outputPanel.save()
Usage outputPanel.save(fileURI [, bAppendToFile]) Parameters fileURI
A string that specifies the local file to contain the Output panels contents.
optional parameter, if it has a value of true, appends the Output panels contents to the output file. If bAppendToFile is false, the method overwrites the output file if it already exists. The default value is false.
bAppendToFile Returns
Method; saves the contents of the Output panel to a local text file, in UTF-8 encoding. The local filename must be specified as a URI. You can also specify that the contents be appended to the contents of a local file, rather than being overwritten. If the URI is invalid or unspecified, an error is reported. This method is useful for batch processing. For example, you can create a JSFL file that compiles several components. Any compile errors appear in the Output panel, and you can use this method to save the resulting errors to a text file, which can be automatically parsed by the build system in use.
symbolInstance.accName
Description A string that is equivalent to the Name field in the Accessibility panel. A string that specifies the actions assigned to the symbol. A string that, for button symbols only, sets the same property as the pop-up menu for Track as Button or Track as Menu Item in the Property inspector. An integer that is part of the color transformation for the instance, specifying the Advanced Effect Alpha settings; equivalent to using the Color > Advanced setting in the Property inspector and adjusting the controls on the right of the dialog box. the instance; equivalent to using the Color > Advanced setting in the Instance Property inspector (the percentage controls on the left of the dialog box).
symbolInstance.actionScript symbolInstance.buttonTracking
symbolInstance.colorAlphaAmount
symbolInstance.colorAlphaPercent An integer that specifies part of the color transformation for
symbolInstance.colorBlueAmount
An integer that is part of the color transformation for the instance; equivalent to using the Color > Advanced setting in the Instance Property inspector. An integer that is part of the color transformation for the instance; equivalent to using the Color > Advanced setting in the Instance Property inspector (the percentage controls on the left of the dialog box). An integer that is part of the color transformation for the instance; equivalent to using the Color > Advanced setting in the Instance Property inspector. Allowable values are from 255 to 255. using the Color > Advanced setting in the Instance Property inspector (the percentage controls on the left of the dialog box).
symbolInstance.colorBluePercent
symbolInstance.colorGreenAmount
symbolInstance.colorGreenPercent Part of the color transformation for the instance; equivalent to
symbolInstance.colorMode
Description A string that specifies the color mode as identified in the symbol Property inspector Color pop-up menu. An integer that is part of the color transformation for the instance, equivalent to using the Color > Advanced setting in the Instance Property inspector. Part of the color transformation for the instance; equivalent to using the Color > Advanced setting in the Instance Property inspector (the percentage controls on the left of the dialog box). A string that is equivalent to the Description field in the Accessibility panel. A zero-based integer that specifies the first frame to appear in the Timeline of the graphic. A Boolean value that enables and disables the accessibility of the objects children; equivalent to the inverse logic of the Make Child Objects Accessible setting in the Accessibility panel. A string that, for graphic symbols, sets the same property as the Loop pop-up menu in the Property inspector. A string that is equivalent to the shortcut key associated with the symbol; equivalent to the Shortcut field in the Accessibility panel. A Boolean value that enables or disables the accessibility of the object; equivalent to the inverse logic of the Make Object Accessible setting in the Accessibility panel. A string that specifies the type of symbol; equivalent to the value for Behavior in the Create New Symbol and Convert To Symbol dialog boxes. An integer that is equivalent to the Tab index field in the Accessibility panel.
This property is not available for graphic objects.
The following example checks to see if the object is accessible; a return value of false means the object is accessible:
var isSilent = fl.getDocumentDOM().selection[0].silent;
fl.getDocumentDOM().selection[0].silent = false;
Usage symbolInstance.symbolType Description
Property; a string that specifies the type of symbol. This property is equivalent to the value for Behavior in the Create New Symbol and Convert To Symbol dialog boxes. Acceptable values are "button", "movie clip", and "graphic".
The following example sets the first symbol in the first frame of the first layer in the Timeline of the current document to behave as a graphic symbol:
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].symbolType = "graphic";
Usage symbolInstance.tabIndex Description
Property; an integer that is equivalent to the Tab index field on the Accessibility panel. Creates a tab order in which objects are accessed when the user presses the Tab key. This property is not available for graphic symbols.
The following example sets the tabIndex property of the mySymbol object to 3 and displays that value in the Output panel:
var mySymbol = fl.getDocumentDOM().selection[0]; mySymbol.tabIndex = 3; fl.trace(mySymbol.tabIndex);
SymbolItem object
Item object > SymbolItem object
The SymbolItem object is a subclass of the Item object. Method summary for the SymbolItem object In addition to the Item object methods, you can use the following methods with the SymbolItem object:
Method Description movie clip.
symbolItem.exportSWC() symbolItem.exportSWF()
symbolItem.convertToCompiledClip() Method; converts a symbol item in the library to a compiled
Method; exports the symbol to a SWC file. Method; exports the symbol item to a SWF file specified by a URI.
Property summary for the SymbolItem object In addition to the Item object properties, the following properties are available for the SymbolItem object:
symbolItem.sourceAutoUpdate
Description Property; a Boolean value. If true, the item is updated when the FLA is published. Property; a string that specifies the path for the source FLA file in URI format (file:///). Property; a string that specifies the name of the item in the source file library. Property; a string that specifies the type of symbol. Read-only; a Timeline object.
symbolItem.sourceFilePath
symbolItem.sourceLibraryName
symbolItem.symbolType symbolItem.timeline
symbolItem.convertToCompiledClip()
Usage symbolItem.convertToCompiledClip()
Method; converts a symbol item in the library to a compiled movie clip.
Property; a zero-based integer that specifies the beginning of a text subselection. You can use this property with text.selectionEnd to select a range of characters. Characters up to, but not including, text.selectionEnd are selected.
If there is an insertion point or no selection, text.selectionEnd is equal to
text.selectionStart.
If text.selectionStart is set to a value greater than text.selectionEnd,
text.selectionEnd Example
is set to text.selectionStart, and no text is selected.
The following example sets the start of the text subselection to the sixth character:
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].selectionSta rt = 5;
The following example selects the characters Barbara from a text field that contains the text My name is Barbara and formats them as bold and green:
fl.getDocumentDOM().selection[0].selectionStart = 11; fl.getDocumentDOM().selection[0].selectionEnd = 18; var s = fl.getDocumentDOM().selection[0].selectionStart; var e = fl.getDocumentDOM().selection[0].selectionEnd; fl.getDocumentDOM().setElementTextAttr('bold', true, s, e); fl.getDocumentDOM().setElementTextAttr("fillColor", "#00ff00", s, e);
text.setTextAttr()
Usage text.setTextAttr(attrName, attrValue [, startIndex [, endIndex]]) Parameters attrName attrValue
A string that specifies the name of the TextAttrs object property to change. The value for the TextAttrs object property.
Note: For a list of possible values for attrName and attrValue, see Property summary for the TextAttrs object on page 299. startIndex
An integer that is the index (zero-based) of the first character in the array. This parameter is optional.
An integer that is a range of text, which starts at startIndex and goes up to, but not including, endIndex. This parameter is optional.
Method; sets the attribute specified by the attrName parameter associated with the text identified by startIndex and endIndex to the value specified by attrValue. This method can be used to change attributes of text that might span TextRun elements (see TextRun object), or that are portions of existing TextRun elements. Using it may change the position and number of TextRun elements within this objects text.textRuns array. If you omit the optional parameters, the method uses the entire text objects character range. If you specify only startIndex, the range is a single character at that position. If you specify both startIndex and endIndex, the range starts from startIndex and goes up to, but not including, the character located at endIndex.
Property summary for the ToolObj object The following property is available for the Tools object.
toolObj.position
Description Read-only; an integer specifying the position of the tool in the Tools panel.
Usage toolObj.enablePIControl( control, bEnable ) Parameters control A string that specifies the name of the control to enable or disable. Legal values depend on the Property inspector invoked by this tool (see toolObj.setPI()).
A shape Property inspector has the following controls:
stroke fill
A text Property inspector has the following controls:
type color direction alignRight position rotation selectable deviceFonts link font bold alignLeft alignJustify autoKern format html varEdit maxChars pointsize italic alignCenter spacing small lineType border options target
A movie Property inspector has the following controls:
size framerate bEnable publish player background profile
A Boolean value that determines whether to enable (true) or disable (false) the
control.
Method; enables or disables the specified control in a PI. Used only when creating extensible tools.
The following command in an extensible tools JavaScript file will set Flash to not show the stroke options in the Property inspector for that tool:
theTool.enablePIControl( "stroke", false);
Usage toolObj.position Description
Read-only property; an integer specifying the position of the tool in the Tools panel.
The following commands in the mouseDown() method of a tools JavaScript file will show that tools position in the Tools panel as an integer in the Output panel:
myToolPos = fl.tools.activeTool.position; fl.trace(myToolPos);
toolObj.setIcon()
Usage toolObj.setIcon( file ) Parameters file A string that specifies the name of the PNG file to use as the icon. The PNG file must be placed in the Configuration/Tools folder. Returns
Method; identifies a PNG file to use as a tool icon in the Flash Tools panel.
The following example specifies that the image in the arrow1.png file should be used as the icon for the tool named theTool.
theTool.setIcon("arrow1.png");
toolObj.setMenuString()
Usage toolObj.setMenuString( menuStr ) Parameters menuStr
A string that specifies the name that appears in the pop-up menu as the name for the
Method; sets the string that appears in the pop-up menu as the name for the tool.
The following example specifies that the tool named theTool should display the name Arrow Style 1 in its pop-up menu.
theTool.setMenuString("Arrow Style 1");
Usage toolObj.setOptionsFile( xmlFile ) Parameters xmlFile
A string that specifies the name of the XML file that has the description of the tools
options.
Method; associates an XML file (located in the Configuration/Tools folder) with the tool to appear in a modal panel that is invoked by an Options button in the Property inspector.
is running, the this keyword is equal to this object.
The argc integer is the number of arguments being passed to the function. The argv pointer is a pointer to an array of jsval structures. The array is argc elements
in length.
The rval pointer is a pointer to a single jsval structure. The functions return value should
be written to *rval.
JS_FALSE,
The function returns JS_TRUE if successful; JS_FALSE otherwise. If the function returns the current script stops executing and an error message appears.
JSBool JS_DefineFunction()
Usage JSBool JS_DefineFunction(unsigned short *name, JSNative call, unsigned int nargs) Description
Method; registers a C-level function with the JavaScript interpreter in Flash. After the JS_DefineFunction() function registers the C-level function that you specify in the call argument, you can invoke it in a JavaScript script by referring to it with the name that you specify in the name argument. The name argument is case-sensitive. Typically, this function is called from the MM_Init() function, which Flash calls during startup.
Arguments unsigned short *name, JSNative call, unsigned int nargs
The name argument is the name of the function as it is exposed to JavaScript. The call argument is a pointer to a C-level function. The function must return a JSBool,
which indicates success or failure.
The nargs argument is the number of arguments that the function expects to receive.
A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.
unsigned short *JS_ValueToString()
Usage unsigned short *JS_ValueToString(JSContext *cx, jsval v, unsigned int *pLength) Description
Method; extracts a function argument from a jsval structure, converts it to a string, if possible, and passes the converted value back to the caller.
Note: Do not modify the returned buffer pointer or you might corrupt the data structures of the JavaScript interpreter. To change the string, you must copy the characters into another buffer and create a new JavaScript string. Arguments JSContext *cx, jsval v, unsigned int *pLength
The cx argument is the opaque JSContext pointer that passes to the JavaScript function. The v argument is the jsval structure from which the string is to be extracted. The pLength argument is a pointer to an unsigned integer. This function sets *plength equal
to the length of the string in bytes.
A pointer that points to a null-terminated string if successful or to a null value on failure. The calling routine must not free this string when it finishes. JSBool JS_ValueToInteger()

document.rotateSelection() document.save()
document.saveAndCompact()
document.scaleSelection()
document.selectAll()
document.selectNone() document.setAlignToDocument()
document.setCustomFill()
document.setCustomStroke()
document.setElementProperty()
document.setElementTextAttr()
document.setFillColor()
document.setInstanceAlpha() document.setInstanceBrightness() document.setInstanceTint() document.setSelectionBounds() document.setSelectionRect()
document.setStroke() document.setStrokeColor()
document.setStrokeSize()
document.setStrokeStyle()
document.setTextRectangle()
Description Changes the bounding rectangle for the selected text item to the specified size. Sets the text selection of the currently selected text field to the values specified by the startIndex and endIndex values. Inserts a string of text. Moves the transformation point of the current selection. Skews the selection by a specified amount. Smooths the curve of each selected fill outline or curved line. Spaces the objects in the selection evenly. Straightens the currently selected strokes; equivalent to using the Straighten button in the Tools panel. Swaps the current selection with the specified one. Executes a Test Movie operation on the document. Executes a Test Scene operation on the current scene of the document. Performs a trace bitmap on the current selection; equivalent to selecting Modify > Bitmap > Trace Bitmap. Performs a general transformation on the current selection by applying the matrix specified in the arguments. Ungroups the current selection. Unlocks all locked elements on the currently selected frame. Posts a XMLUI dialog box.
document.setTextSelection()
document.setTextString() document.setTransformationPoint() document.skewSelection() document.smoothSelection()
document.space() document.straightenSelection()
document.swapElement() document.testMovie() document.testScene()
Method; returns a new Path object. You typically use this method only when creating extensible tools.
The following example returns a new Path object:
fl.drawingLayer.newPath();
drawingLayer.setColor()
Usage drawingLayer.setColor(color)
The color parameter is a color that is specified by a string, integer, or hexadecimal value.
Method; sets the color of subsequently drawn data. Applies only to persistent data. To use this method, the parameter passed to drawingLayer.beginDraw() must be set to true. You typically use this method only when creating extensible tools.
The following example draws a red line on the Stage:
fl.drawingLayer.beginDraw( true ); fl.drawingLayer.beginFrame(); fl.drawingLayer.setColor( "#ff0000" ); fl.drawingLayer.moveTo(0,0); fl.drawingLayer.lineTo(100,100); fl.drawingLayer.endFrame(); fl.drawingLayer.endDraw();
Edge object
The Edge object represents an edge of a shape on the Stage. Method summary for the Edge object The following methods are available for the Edge object:
edge.getControl()
Description Gets a point object set to the location of the specified control point of the edge.
edge.getHalfEdge() Returns a HalfEdge object. edge.setControl() edge.splitEdge()
Sets the position of the control point of the edge. Splits the edge into two pieces.
Property summary for the Edge object The following properties are available for the Edge object:
edge.id edge.isLine
Description Read-only property; an integer that represents a unique identifier for the edge. Read-only property; an integer with a value of 0 or 1.
Usage edge.getControl(i) Parameters
The parameter i is an integer that specifies which control point of the edge to return. Specify 0 for the first control point, 1 for the middle control point, or 2 for the end control point. If the edge.isLine property is true, the middle control point is set to the midpoint of the segment joining the beginning and ending control points.
The specified control point.
Method; gets a point object set to the location of the specified control point of the edge.
edge.splitEdge()
Usage edge.splitEdge( t ) Parameters
The t parameter is a floating point value between 0 and 1 that specifies where to split the edge. A value of 0 represents one end point, and 1 the other. For example, passing a value of 0.5 splits the edge in the middle, which, for a line is exactly in the center. If the edge represents a curve, 0.5 represents the parametric middle of the curve.
Splits the edge into two pieces. You must call shape.beginEdit() before using this method.
The following example splits the specified edge in half.
var shape = fl.getDocumentDOM().selection[0]; shape.beginEdit() shape.edges[0].splitEdge( 0.5 ); shape.endEdit()
Effect object
This is a single effect descriptor object. The fl.activeEffect and the fl.effects properties contain this type of object. The Effect object represents an instance of a Timeline effect. Property summary for the Effect object In addition to the properties listed in the following table, Effect objects can also have user-defined parameters, which must be specified in the same XML file that specifies the effect.effectName and effect.sourceFile properties. These parameters specify which UI elements should be created (such as edit fields, check boxes, and list boxes), which is controlled by the type of effect you are creating. You can specify labels that will appear with the control in addition to default values.
effect.effectName effect.groupName
Description Read-only property; a string that appears in the Context menu for effects. Read-only property; a string that represents the name of the effect group used for the hierarchical Context menu for effects. Read-only property; a string that specifies the name of JSFL source file for the specified effect. Read-only property; a string that specifies the type of symbol to create during the initial application of the effect. A Boolean value that lets you override the default behavior of using XMLUI to construct a dialog box that consists of one or more controls.
effect.sourceFile
effect.symbolType
effect.useXMLToUI
effect.effectName
Usage effect.effectName Description
Read-only property; a string that appears in the Context menu for effects. Each effect must be uniquely named.
The following example stores the name of the current effect in the efName variable:
var efName = fl.activeEffect.effectName;
effect.groupName
Usage effect.groupName Description
Read-only property; a string that represents the name of the effect group used for the hierarchical Context menu for effects. If this value is an empty string, the effect appears ungrouped at the top level of the Context menu. The group name and effect name are specified in the XML file for the effect.
fl.configDirectory
fl.configURI
fl.createNewDocList
fl.createNewDocListType
fl.createNewTemplateList
fl.documents
fl.drawingLayer
fl.effects
fl.Math
fl.mruRecentFileList
fl.mruRecentFileListType
fl.outputPanel fl.tools fl.version
fl.xmlui
fl.activeEffect
Usage fl.activeEffect Description
Read-only property; the Effect object for the current effect being applied. For a list of properties available to fl.activeEffect, see Property summary for the Effect object on page 126.
The following example stores an object that represents the current effect in the ef variable.
var ef = fl.activeEffect;
Usage fl.browseForFileURL( browseType [, title [, previewArea ] ]) Parameters browseType A string that specifies the type of file browse operation. Valid values are "open", "select" or "save". The values "open" and "select" both bring up the system File Open dialog box. Each value is provided for compatibility with Dreamweaver. The value "save" brings
up a system File Save dialog box.
A string that specifies the title for the File Open or File Save dialog box. If this parameter is omitted, a default value is used. This parameter is optional.
previewArea
An optional parameter that is ignored by Flash and Fireworks and is present only for compatibility with Dreamweaver.
A string containing the URL of the file.
Method; opens a File Open or File Save system dialog box and lets the user specify a file to be opened or saved.
The following example lets the user choose a FLA file to open and then opens the file. (The fl.browserForFileURL() method can browse for any type of file, but fl.openDocument() can open only FLA files.)
var fileURL = fl.browseForFileURL("open", "Select file"); var doc = fl.openDocument(fileURL);
Usage fl.closeAll() Parameters
Method; closes all open documents, displaying the Save As dialog box for any documents that were not previously saved. The method prompts the user, if necessary, but does not terminate the application. See also fl.closeDocument().
The following code closes all open documents.
fl.closeAll();
fl.closeDocument()
Usage fl.closeDocument( documentObject [, bPromptToSaveChanges] ) Parameters documentObject,
The following example reverts the current FLA document to its last saved version; any changes made since the last save are lost.
fl.revertDocument(fl.getDocumentDOM());
fl.runScript()
Usage fl.runScript( fileURI [, funcName [, arg1, arg2,.] ]) Parameters fileURI
A string that specifies the name of the script file to execute, expressed as a URI (file:/// to execute in the JSFL file that is specified in
funcName A string that identifies a function fileURI. This parameter is optional.
arg Returns
An optional parameter that specifies one or more arguments to be passed to funcname.
If funcName is specified, returns the function's result as a string. Otherwise, nothing is returned.
Method; executes a JavaScript file. If a function is specified as one of the arguments, it runs the function and also any code in the script that is not within the function. The rest of the code in the script runs before the function is run.
Suppose there is a script file named testScript.jsfl in drive C: and its contents are as follows:
function testFunct(num, minNum) { fl.trace("in testFunct: 1st arg: " + num + " 2nd arg: " + minNum); } for (i=0; i<2; i++) { fl.trace("in for loop i=" + i); } fl.trace("end of for loop"); //end of testScript.jsfl
If you issue the following command:
fl.runScript("file:///C|/testScript.jsfl", "testFunct", 10, 1);
The following information appears in the Output panel:
in for loop i=0 in for loop i=1 end of for loop in testFunct: 1st arg: 10 2nd arg: 1
You can also just call testScript.jsfl without executing a function:
fl.runScript("file:///C|/testScript.jsfl");
which produces the following in the Output panel:
in for loop i=0 in for loop i=1 end of for loop
fl.saveAll()
Usage fl.saveAll() Parameters
Method; saves all open documents, displaying the Save As dialog box for any documents that were not previously saved. See also fl.saveDocumentAs(), fl.saveDocument(), document.save(), and document.saveAndCompact().
The following example saves all open documents.
fl.saveAll();
Usage fl.saveDocument( document [, fileURI] ) Parameters document
The following example renames the currently selected library item to new name:
fl.getDocumentDOM().library.renameItem("new name");
library.selectAll()
Usage library.selectAll( [ bSelectAll ] ) Parameters bSelectAll A Boolean value that specifies whether to select or deselect all items in the library. Omit this parameter or use the default value of true to select all the items in the library; false deselects all library items. This parameter is optional. Returns
Selects or deselects all items in the library.
The following examples select all the items in the library:
fl.getDocumentDOM().library.selectAll(); fl.getDocumentDOM().library.selectAll(true);
The following examples deselect all the items in the library:
fl.getDocumentDOM().library.selectAll(false); fl.getDocumentDOM().library.selectNone();
library.selectItem()
Usage library.selectItem( namePath [, bReplaceCurrentSelection [, bSelect ] ] ) Parameters namePath
bReplaceCurrentSelection A Boolean value that specifies whether to replace the current selection or add the item to the current selection. The default value is true (replace current selection). This parameter is optional. bSelect A Boolean value that specifies whether to select or deselect an item. The default value is true (select). This parameter is optional. Returns
A Boolean value: true if the specified item exists; false otherwise.
Selects a specified library item.
The following example changes the current selection in the library to symbol 1 inside untitled folder 1:
fl.getDocumentDOM().library.selectItem("untitled Folder_1/Symbol_1");
The following example extends what is currently selected in the library to include symbol 1 inside untitled folder 1:
fl.getDocumentDOM().library.selectItem("untitled Folder_1/Symbol_1", false);
The following example deselects symbol 1 inside untitled folder 1 and does not change other selected items:
Property; a floating-point value that specifies the (1,1) element in the matrix. This value represents the scale factor of the objects y-axis.
See matrix.a. matrix.tx
Usage matrix.tx Description
Property; a floating-point value that specifies the x-axis location of a symbols registration point or the center of a shape. It defines the x translation of the transformation. You can move an object by setting the matrix.tx and matrix.ty properties.
In the following example, setting tx and ty to 0 moves the registration point of the object to point 0,0 in the document:
var mat = fl.getDocumentDOM().selection[0].matrix; mat.tx = 0; mat.ty = 0; fl.getDocumentDOM().selection[0].matrix = mat;
Usage matrix.ty Description
Property; a floating-point value that specifies the y-axis location of a symbols registration point or the center of a shape. It defines the y translation of the transformation. You can move an object by setting the matrix.tx and matrix.ty properties.
See the matrix.tx example.
outputPanel object
This object represents the Output panel, which displays troubleshooting information such as syntax errors. To access this object, use fl.outputPanel (or flash.outputPanel). Method summary for the outputPanel object The outputPanel object uses the following methods.
outputPanel.clear() outputPanel.save()
Description Clears the contents of the Output panel. Saves the contents of the Output panel to a local text file, in UTF-8 encoding. Adds a line to the contents of the Output panel, terminated by a new line.
outputPanel.trace()
outputPanel.clear()
Usage outputPanel.clear() Parameters
Method; clears the contents of the Output panel. You can use this method in a batch processing application to clear a list of errors, or to save them incrementally by using this method in conjunction with outputPanel.save().
The following example clears the current contents of the Output panel:
fl.outputPanel.clear();
outputPanel.save()
Usage outputPanel.save(fileURI [, bAppendToFile]) Parameters
The fileURI parameter is a string that specifies the local file to contain the Output panels contents. The optional bAppendToFile parameter, if it has a value of true, appends the Output panels contents to the output file. If bAppendToFile is false, the method overwrites the output file if it already exists. The default value is false.
Method; saves the contents of the Output panel to a local text file, in UTF-8 encoding. The local filename must be specified as a URI. You can also specify that the contents be appended to the contents of a local file, rather than being overwritten. If the URI is invalid or unspecified, an error is reported. This method is useful for batch processing. For example, you can create a JSFL file that compiles several components. Any compile errors appear in the Output panel, and you can use this method to save the resulting errors to a text file, which can be automatically parsed by the build system in use.
screen.silent
Usage screen.silent Description
Property; a Boolean value that specifies whether the object is accessible. This is equivalent to the inverse logic of the Make Object Accessible setting in the Accessibility panel. That is, if silent is true, it is the same as having the Make Object Accessible option deselected in the Accessibility panel. If silent is false, it is the same as having the Make Object Accessible option selected in the Accessibility panel.
The following example retrieves the silent value of the object (a value of false means the object is accessible):
var isSilent = fl.getDocumentDOM().screenOutline.screens[1].silent;
The following example sets the object to be accessible:
fl.getDocumentDOM().screenOutline.screens[1].silent = false;
screen.tabIndex
Usage screen.tabIndex Description
Property; equivalent to the Tab Index field in the Accessibility panel. This value lets you determine the order in which objects are accessed when the user presses the Tab key.
The following example gets the tab index of the object:
var theTabIndex = fl.getDocumentDOM().screenOutline.screens[1].tabIndex;
The following example sets the tab index of the object to 1:
fl.getDocumentDOM().screenOutline.screens[1].tabIndex = 1;
screen.timeline
Usage screen.timeline
Read-only property; the Timeline object for the screen.
The following example gets the screenOutline property of the current slide document, assigns the array of timeline properties for the first screen to myArray, and displays those properties in the Output panel:
myArray = new Array(); if(fl.getDocumentDOM().screenOutline) { for(i in fl.getDocumentDOM().screenOutline.screens[0].timeline) { myArray.push(" "+i+" : "+fl.getDocumentDOM().screenOutline.screens[0].timeline[i]+" ") ; } fl.trace("Here are the properties of the screen named "+ fl.getDocumentDOM().screenOutline.screens[0].name+": "+myArray); }
ScreenOutline object
The ScreenOutline object represents the group of screens in a slide or form document. The object is accessed by using fl.getDocumentDOM().screenOutline. The ScreenOutline object exists only if the document is a slide or form document, so before accessing the property, use document.allowScreens() to verify that a Screens document exists, as shown in the following example:
if(fl.getDocumentDOM().allowScreens) { var myName = fl.getDocumentDOM().screenOutline.rootScreen.childScreens[0].name; fl.trace("The name of the screen is " + myName + ". "); }
Method summary for the ScreenOutline object You can use the following methods with the ScreenOutline object:
screenOutline.copyScreenFromFile()
Description Inserts all the screens, or a named screen and its children, from a specified document under the currently selected screen. Deletes the currently selected screen(s), or a specified screen, and the children of the screen(s). Duplicates the currently selected screen(s) or a specified screen. Returns an array of Screen objects that are currently selected in the screen outline. Inserts a nested screen of a specific type into a particular location in the screen outline. Inserts a new blank screen of a specified type into the document at a specified location. Moves the specified screen in relation to the value of the referenceScreen parameter; either before, after, as the first child, or as the last child. Changes the screen with a specified name to a new name. Sets the current selection in the screen outline to the specified screen.
The optional screenName parameter is a string that specifies the name of the screen to be deleted. If you dont pass a value for screenName, the currently selected screen(s) and their children are deleted.
Deletes the currently selected screen(s), or a specified screen, and the children of the screen(s).
The following example removes the screen named apple and all its children:
fl.getDocumentDOM().screenOutline.deleteScreen("apple");
Usage screenOutline.duplicateScreen( [screenName] )
The optional screenName parameter is a string value that specifies the screen name to duplicate. If you dont pass a value for screenName, the currently selected screen(s) are duplicated.
A Boolean value: true if the screen is successfully duplicated; false otherwise.
Duplicates the currently selected screen(s) or a specified screen. The duplicate screens are given a default name by appending _copy to the original name, such as Screen_copy, Screen_copy2, and so on. If you duplicate multiple screens, the duplicates are placed directly below the selected screen that is lowest in the screen outline hierarchy.
The following example duplicates a screen named apple:
fl.getDocumentDOM().screenOutline.duplicateScreen("apple");
Usage screenOutline.getSelectedScreens() Parameters
An array of selected Screen objects (see Screen object).
Returns an array of Screen objects that are currently selected in the screen outline.
The following example stores the selected Screen objects in the myArray variable and displays the screen names in the Output panel:
var myArray = fl.getDocumentDOM().screenOutline.getSelectedScreens(); for (var i in myArray) { fl.trace(myArray[i].name) }
Usage screenOutline.insertNestedScreen( [ name [, referenceScreen [, screenTypeName ] ] ]) Parameters
The optional name parameter is a string indicating the name of the new screen to insert. An empty name will insert a screen with a default screen name, such as Slide n or Form n (where n is the first available unique number). The optional referenceScreen parameter is a string indicating the name of the screen into which the new screen is inserted as a child. If this parameter is not specified, the new screen is inserted as a child of the currently selected screen. The optional screenTypeName parameter is a string that specifies the name of the screen type to attach to the new nested screen. The screen type and classname will be set for this screen. If this parameter is not specified, the type is inherited from the parent screen. Acceptable values are "Form" and "Slide".
The following example sets the pattern property to "random" for a stroke style of ragged:
var myStroke = fl.getDocumentDOM().getCustomStroke(); myStroke.style = "ragged";
myStroke.pattern = "random"; fl.getDocumentDOM().setCustomStroke( myStroke );
stroke.rotate
Usage stroke.rotate Description
A string that specifies the rotation of a hatch line. Available only if the stroke.style property is set to "hatched". Acceptable values are "none", "slight", "medium", and "free".
The following example sets the rotate property to "free" for a style stroke of hatched:
stroke.space
Usage stroke.space Description
A string that specifies the spacing of a hatched line. Available only if the stroke.style property is set to "hatched". Acceptable values are "very close", "close", "distant", and "very distant".
The following example sets the space property to "close" for a stroke style of hatched:
stroke.style
Usage stroke.style Description
A string that describes the stroke style. Acceptable values are "noStroke", "solid", "dashed", "dotted", "ragged", "stipple", and "hatched". Some of these values require additional properties of the stroke object to be set, as described in the following list:
If value is "solid" or "noStroke", there are no other properties. If value is "dashed", there are two additional properties: "dash1" and "dash2". If value is "dotted", there is one additional property: "dotSpace". If value is "ragged", there are three additional properties: "pattern", "waveHeight", and "waveLength". If value is "stipple", there are three additional properties: "dotSize", "variation", and "density". If value is "hatched", there are six additional properties: "hatchThickness", "space", "jiggle", "rotate", "curve", and "length".
The following example stores the value of the textRuns property in the myTextRuns variable:
var myTextRuns = fl.getDocumentDOM().selection[0].textRuns;
text.textType
Usage text.textType Description
Property; a string that specifies the type of text field. Acceptable values are "static", "dynamic", and "input".
The following example sets the textType property to "input".
fl.getDocumentDOM().selection[0].textType = "input";
text.useDeviceFonts
Usage text.useDeviceFonts Description
Property; a Boolean value. A value of true causes Flash to draw text using device fonts. This property works only with static text; if used with other text types, the property generates a warning.
The following example causes Flash to use device fonts with static text.
fl.getDocumentDOM().selection[0].useDeviceFonts = true;
text.variableName
Usage text.variableName Description
Property; a string that contains the name of the variable associated with the text object. This property works only with dynamic or input text; it generates a warning if used with other text types.
TextRun object
The TextRun object represents a run of characters that have attributes that match all of the properties in the TextAttrs object. This object is a property of the Text object (text.textRuns). Property summary for the TextRun object In addition to the properties available for use with the Text object, the TextRun object provides the following properties.
textRun.characters textRun.textAttrs
Description A string that represents the text contained in the TextRun object. The TextAttrs object containing the attributes of the run of text.
textRun.characters
Usage textRun.characters Description
Property; the text contained in the TextRun object.
The following example displays the characters that make up the first run of characters in the selected text field in the Output panel.
fl.trace(fl.getDocumentDOM().selection[0].textRuns[0].characters);
textRun.textAttrs
Usage textRun.textAttrs Description
Property; the TextAttrs object containing the attributes of the run of text.
The following example displays the properties of the first run of characters in the selected text field in the Output panel.
var curTextAttrs = fl.getDocumentDOM().selection[0].textRuns[0].textAttrs; for (var prop in curTextAttrs) { fl.trace(prop + " = " + curTextAttrs[prop]); }
Timeline object
The Timeline object represents the Flash Timeline, which can be accessed for the current document by fl.getDocumentDOM().getTimeline(). This method returns the Timeline of the current scene or symbol that is being edited. When you work with scenes, each scenes Timeline has an index value, and can be accessed for the current document by fl.getDocumentDOM().timelines[i]. (In this example, i is the index of the value of the Timeline.) When you work with frames by using the methods and properties of the Timeline object, remember that the frame value is a zero-based index (not the actual frame number in the sequence of frames in the Timeline). That is, the first frame has a frame index of 0. Method summary for the Timeline object The following methods are available for the Timeline object.
The following example inserts three frames in the current layer only:
fl.getDocumentDOM().getTimeline().insertFrames(3, false);
The following example inserts four frames in all layers, starting from the first frame:
fl.getDocumentDOM().getTimeline().insertFrames(4, true, 0);
timeline.insertKeyframe()
Usage timeline.insertKeyframe([frameNumIndex]) Parameters
A zero-based index that specifies the frame index at which to insert the keyframe in the current layer. If you omit frameNumIndex, the method uses the frame number of the current playhead or selected frame. This parameter is optional.
frameNumIndex Returns
Method; inserts a keyframe at the specified frame. If you omit the parameter, the method inserts a keyframe using the playhead or selection location.
This method works the same as timeline.insertBlankKeyframe() except that the inserted keyframe contains the contents of the frame it converted (that is, its not blank).
The following example inserts a keyframe at the playhead or selected location:
fl.getDocumentDOM().getTimeline().insertKeyframe();
The following example inserts a keyframe at Frame 10 of the second layer (remember that index values are different from frame or layer number values):
fl.getDocumentDOM().getTimeline().currentLayer = 1; fl.getDocumentDOM().getTimeline().insertKeyframe(9);
Usage timeline.layerCount Description
Read-only property; an integer that represents the number of layers in the specified Timeline.
The following example uses the NumLayer variable to store the number of layers in the current scene:
var NumLayer = fl.getDocumentDOM().getTimeline().layerCount;
timeline.layers
Usage timeline.layers Description
Read-only property; an array of layer objects.
The following example uses the currentLayers variable to store the array of layer objects in the current document:
var currentLayers = fl.getDocumentDOM().getTimeline().layers;
timeline.name
Usage timeline.name Description
Property; a string that specifies the name of the current Timeline. This name is the name of the current scene, screen (slide or form), or symbol that is being edited.
The following example retrieves the first scene name:
var sceneName = fl.getDocumentDOM().timelines[0].name;
The following example sets the first scene name to FirstScene:
fl.getDocumentDOM().timelines[0].name = "FirstScene";
timeline.pasteFrames()
Usage timeline.pasteFrames([startFrameIndex [, endFrameIndex]]) Parameters startFrameIndex A zero-based index that specifies the beginning of a range of frames to paste. If you omit startFrameIndex, the method uses the current selection. This parameter is optional. endFrameIndex A zero-based index that specifies the frame at which to stop pasting frames. The method pastes up to, but not including, endFrameIndex. If you specify only startFrameIndex, endFrameIndex defaults to the startFrameIndex value. This parameter is optional. Returns
var savedSelectionList = fl.getDocumentDOM().getTimeline().getSelectedFrames(); // do something that changes the selection fl.getDocumentDOM().getTimeline().setSelectedFrames(savedSelectionList);
The following example selects the top layer, Frame 1, up to, but not including, Frame 10, then adds Frame 12, up to, but not including, Frame 15, on the same layer to the current selection:
fl.getDocumentDOM().getTimeline().setSelectedFrames([0, 0, 9]); fl.getDocumentDOM().getTimeline().setSelectedFrames([0, 11, 14], false);
Usage timeline.setSelectedLayers(index [, bReplaceCurrentSelection])
Parameters index
A zero-based index for the layer to select. to
bReplaceCurrentSelection A Boolean value that, if it is set to true, causes the method replace the current selection; false causes the method to extend the current selection. The default value is true. This parameter is optional. Returns
Method; sets the layer to be selected, and also makes the specified layer the current layer. Selecting a layer also means that all the frames in the layer are selected.
The following example selects the top layer:
fl.getDocumentDOM().getTimeline().setSelectedLayers(0);
The following example adds the next layer to the selection:
fl.getDocumentDOM().getTimeline().setSelectedLayers(1, false);
Usage timeline.showLayerMasking([layer]) Parameters layer A zero-based index of a mask or masked layer to show masking during authoring. This parameter is optional. Returns
Method; shows the layer masking during authoring by locking the mask and masked layers. This method uses the current layer if no layer is specified. If you use this method on a layer that is not of type Mask or Masked, Flash will display an error in the Output panel.
The following example specifies that the layer masking of the first layer should show during authoring.
fl.getDocumentDOM().getTimeline().showLayerMasking(0);
A ToolObj object represents an individual tool in the Tools panel. To access a ToolObj object, use properties of the Tools object: either the tools.toolObjs array or tools.activeTool. Method summary for the ToolObj object The following methods are available for the ToolObj object.
Note: The following methods are used only when creating extensible tools. Method
toolObj.enablePIControl()
Description Enables or disables the specified control in a PI. Used only when creating extensible tools. Identifies a PNG file to use as a tool icon in the Flash Tools panel. Sets the string that appears in the pop-up menu as the name for the tool. Associates an XML file (located in the Configuration/Tools folder) with the tool to appear in a modal panel that is invoked by an Options button in the Property inspector. Sets a particular Property inspector to be used when the tool is activated. Assigns a name to the tool for the configuration of the Tools panel. Sets the tooltip that appears when the mouse is held over the tool icon. Shows or hides a control in the Property inspector. tools JavaScript file to indicate that the free transform handles should appear when the tool is active.
Tags
NX8220 CRM-1652RF KD-200Z P3401 Mediahome Pro-V Nitefly PD-F1009 2800 DVD Version 5 ER-6N Loudspeaker AR-156 H10 20GB XG-55 MDR-XB20EX Multithermo 50 Futaba 8FG DXZ935 Sagem D86C Deskjet 5160 Vgn-fj270-B Trident Mkii Sjmr100 Easyshare P712 Arun100LT2 Absynth 5 MC-809NC FJS974N Program 945GM3 SL-MC7 PCG-FX370 405028X51 DMR-ES10 MHC-RG330 9200 S Kw-avx800 DVD 569 HP102E TH-37PA50E DX6490 IC-F320S Oiii 4GB Jabra A210 R9500 For WII Casio 4380 Kart WII WF-S1051TP V2 2 Fujifilm E900 DC401-4 Mot-SAT3 VC-MH76GM GR-399SNQ TX200 PRO 7800 FX550 SF-6800P C2210 R-933 Command III Benq S88 2480 MF MM-10 Gardena T14E Review IC-T22a-E ICF-C1IP Linux KV-21CL10E 180IS-MB5 Anniversary SBH600 NO 0855 5g ED SC-4320 Deskjet 930C MD-MT831 Venture 2000 Strd2090 El52500 PS50A556s2F DMC-FX8 SH-S223L LV2767 BT160 Studio 4 125 SX CMT-SP55TC LW32A23W Graficko 3D E 2001 SA-7500 Speaker FAX-JX200 IGO 2441 AVR-1506 M1712NR 42WM03ST
manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding
Sitemap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101








