background image

142

EXTENDING FIREWORKS

The Document object

Las

t

 up

d

a

ted

 12/8/2009

Usage

 

dom.setButtonShowDownOnLoad(

bShowDownOnLoad

)

Arguments

bShowDownOnLoad

 

Boolean. If 

true

, the Down-State-on-Load is shown in the button; if 

false

, it is not.

Returns

Nothing.

Description

If the user edits a Button document, this function specifies whether to show the Down-State-on-Load in a button.

dom.setButtonOptions()

Availability

Fireworks 3.

Usage

 

dom.setButtonOptions(

exportOptions, URLString, altTagString, targetTagString, sliceName, 

statusMessage)

Arguments

exportOptions

 

An ExportOptions object (see “

ExportOptions object

” on page  253). 

URLString

 

A string that specifies the URL for the button(s).

altTagString

 and 

targetTagString

  Specify the text for the button alt tag and target tag.

sliceName

 

A string that specifies the name to be assigned to the slice that is associated with the button. If it is 

null

the slice is set to be named automatically.

statusMessage

 

A string that specifies a status message to appear in the browser status line. If an empty string or 

null

 

is passed, no status message appears.

Returns

Nothing.

Description

Sets the Button Export options. If the user edits a button, it sets options for the button being edited; if the user edits a 
normal document, it sets options for all the selected buttons. 

dom.setDefaultBrushAndFillColors()

Availability

Fireworks 3.

Usage

 

dom.setDefaultBrushAndFillColors()

Summary of Contents for 65011817 - Fireworks CS4 - Mac

Page 1: ...Extending ADOBE FIREWORKS CS4...

Page 2: ...ING WARRANTIES WITH RESPECT TO ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE The MacApp software is proprietary to Apple Computer Inc and is licensed to Adobe for distribution only for...

Page 3: ...ion 21 Chapter 3 The Document object Document object properties 27 Document functions 30 Chapter 4 The Fireworks Object Fireworks functions 192 Chapter 5 Objects within Fireworks documents Behavior ob...

Page 4: ...ts BehaviorInfo object 270 BehaviorsList object 273 exportDoc object 273 ImageMap object 276 ImagemapList object 276 SliceInfo object 277 Slices object 279 Chapter 7 Cross Product Extensions Cross pro...

Page 5: ...for example is it substring or subString Useful JavaScript references include JavaScript Bible by Danny Goodman IDG JavaScript The Definitive Guide by David Flanagan O Reilly and Pure JavaScript by R...

Page 6: ...ngine The new Adobe Type Engine provides enhanced typesetting capabilities similar to Adobe Photoshop and Adobe Illustrator You can import or copy paste double byte characters from Illustrator or Phot...

Page 7: ...th Returns the full system path name and path of the generated file AIRext GetJREVersion An object with two properties maxVersion and minVersion if an error occurs the values of the maxVersion and min...

Page 8: ...rcentage or exact pixels instance tranform Specifies the transformation matrix of a symbol instance symbolName Specifies the symbol name frame name Species the name of the state FrameNLayerIntersectio...

Page 9: ...riting extensions The user refers to the person using Fireworks The visitor refers to the person who views the graphic that the user created Additional resources for extension writers To communicate w...

Page 10: ...te JavaScript commands that send calls to the Fireworks Object Model to determine or change the current settings for a Fireworks document For example the following command calls the Fireworks object f...

Page 11: ...be passed to functions as arguments or used as properties such as integer string and so on Fireworks accepts other data types Some functions accept values that are Fireworks objects For more informati...

Page 12: ...nit 72 units inch Using Fireworks API functions Three categories of API functions are described in this book Document functions History panel functions and Fireworks functions The following rules appl...

Page 13: ...ands for both applications app toggleFloater Identical to fw toggleFloater app setFloaterVisibility Identical to fw setFloaterVisibility app getRootDirectory Identical to the Fireworks object property...

Page 14: ...properties for any selected object You can get values for the following read only properties of any type of selected object top left width height visible opacity blendMode name mask To return the nam...

Page 15: ...turn the alt tag that has been applied to the currently selected Hotspot type the following code altTag fw selection 0 altText SliceHotspot SliceHotspot is a subclass of Hotspot A slice has all Hotspo...

Page 16: ...antiAliasMode autoKern orientation pathAttributes Note For the complete list of pathAttributes properties see pathAttributes on page 98 randSeed textRuns textureOffset transformMode To return the ant...

Page 17: ...lHandle3 brushPlacement fillOnTop To return the name of brush on the current path type the following code brush fw selection 0 pathAttributes brush name b Global methods The following are the global F...

Page 18: ...ancel buttons prompt caption text Availability Fireworks 3 Usage prompt caption text Arguments caption A string containing the title of the dialog box text A string containing the prompt for the user...

Page 19: ...ents None Returns An output file Description Available only when exporting Writes the CSS as an external file WRITE_HTML arg1 arg2 argN Availability Fireworks 3 Usage WRITE_HTML arg1 arg2 argN Argumen...

Page 20: ...urn localized error messages appropriate to the specific error For example the English version of Fireworks returns Memory is full for the EOutOfMem property The following list contains the properties...

Page 21: ...docOrDir string Deletes the specified file or directory Returns true if successful false if the file or directory cannot be deleted Unlike deleteFile this method returns true if the file or directory...

Page 22: ...logo png open docname encoding bWrite string string Boolean The first argument must be expressed as file URL Opens the specified file for reading or writing The second argument specifies the encoding...

Page 23: ...urns null if end of file is reached or if the line is longer than 2048 characters readLineUTF8 string Reads one line from the file that has been opened with UTF8 encoding write textString string Write...

Page 24: ...eplace string A color string that specifies the color to use as a replacement for more information see Color string data type on page 7 fills Boolean If set to true fills that match the specified colo...

Page 25: ...sName string Returns the name of the operating system under which Fireworks is running controlFaceColor string Returns the system color used for the control and panel faces Windows only property contr...

Page 26: ...kageApplication Availability Fireworks 10 Usage status AIRext PackageApplication siteFullPath packagePath fileList Arguments siteFullPath Path to the site root folder in which all files that needs to...

Page 27: ...a signed AIR file password Password for the specified certificate if blank or missing user will be prompted for the password Returns 0 if the operation succeeded Description Calls the ADT tool to cre...

Page 28: ...ilability Fireworks 10 Usage configurationPath AIRext GetDigSigPassword Arguments None Returns The previously saved password for the given digital certificate or an empty string Description Returns th...

Page 29: ...n Returns the full system path name and path of the generated file AIRext GetJREVersion Availability Fireworks 10 Usage jreVersObj AIRext GetJREVersion Arguments None Returns An object with two proper...

Page 30: ...the created certificate required keyType Encryption key type either 1024 RSA or 2048 RSA required publisher Name of publisher required orgName Name of organization optional orgUnit Organizational uni...

Page 31: ...text for the output images It works for single and slicedimages Slicedimagesgetthedefault unlessspecifictext is specified for a slice Corresponds to the text that is specified in the Document Specific...

Page 32: ...time it was saved isPaintMode Boolean Set to true if the document is currently in paint mode editing false otherwise isSymbolDocument Boolean Set to true if the document is a Symbol or Button documen...

Page 33: ...Attrs object for more information see PathAttrs object on page 261 This object specifies default attributes that will be applied to all newly created objects pngText object A structure that can be use...

Page 34: ...etDocumentDOM addNewHotspot operates on active document or fw documents documentIndex addNewHotspot operates on specified document dom addBehavior Availability Fireworks 3 Usage dom addBehavior action...

Page 35: ...ents type barName target swapFrame fileName preload Pass down for type Pass navbar1 for the name of the navigation bar target specifies the slice to which the behavior is attached Pass 1 for this valu...

Page 36: ...the next two arguments to specify the frame or image to be used downHighlightFrame is an integer value that specifies the frame to use as a highlight image starting with 0 although to use downHighligh...

Page 37: ...Out 1 MM_simpleRollover Availability Fireworks 3 Arguments None Description Adds a simple rollover behavior Example fw getDocumentDOM addBehavior MM_simpleRollover onMouseOver 1 MM_statusMessage Avail...

Page 38: ...t pass 0 restore is a binary value that specifies whether to restore on a mouse out action pass 1 or not pass 0 Description Adds a swap image behavior Example fw getDocumentDOM addBehavior MM_swapImag...

Page 39: ...e beginning before current after current and end bAdvanceActiveFrame Added in Fireworks 4 specifies whether to change the active frame If it is omitted or true this function sets the active frame to t...

Page 40: ...ailability Fireworks CS3 Usage dom addMasterPageLayer Arguments To add a master page layer the document must already have a master page in it Include the level where the master page layer should be in...

Page 41: ...added see Rectangle data type on page 8 You cannot create an image that is larger than the document therefore if you pass in a rectangle with bounds larger than the document size you can create an im...

Page 42: ...he document that contains the contents of the current paint mode selection The new image is placed directly above the active bitmap You must have a current pixel selection for this to succeed The sele...

Page 43: ...path between two points The new path uses the document s current default path attributes and is added to the current frame and layer Example The following command adds a new line between the specified...

Page 44: ...nts boundingRectangle A rectangle that specifies the bounds within which the new rectangle is added see Rectangle data type on page 8 roundness A floating point value between 0 and 1 that specifies th...

Page 45: ...uses the document s current default path attributes is added on the current frame and layer and has several editable properties such as corner roundness and transformation The difference between a re...

Page 46: ...t at the specified coordinates and copies the path s stroke and fill from the document s current stroke and fill settings fw getDocumentDOM addNewSinglePointPath x 150 y 63 x 150 y 63 x 150 y 63 false...

Page 47: ...new sub layer to the document and makes it the current layer Example The following command adds a new unshared sub layer to layer index 0 with a default name that is generated by Fireworks fw getDocu...

Page 48: ...new text box see Rectangle data type on page 8 bInitFromPrefs If bInitFromPrefs is false the default values for all style properties are used If it is true the most recent values set by the user are u...

Page 49: ...to sizeInBytes If a document has slices sizeInBytes adjusts the size of all exported images so that the sum of the sizes is greater than or equal to sizeInBytes bOkToIncreaseSize Specifies whether the...

Page 50: ...nment is to the canvas or items The default value is false Returns Nothing Description Aligns the selection dom appendPointToHotspot Availability Fireworks 3 Usage dom appendPointToHotspot pt toleranc...

Page 51: ...nPoint and controlPointLast Points that specify the x y coordinates of the preceding control point the main point and the following control point of the new point see Point data type on page 8 Returns...

Page 52: ...Returns Nothing Description Applies the specified character markup to the selected text dom applyCurrentFill Availability Fireworks 3 Usage dom applyCurrentFill NoNullFills Arguments bNoNullFills If...

Page 53: ...getDocumentDOM applyEffects category Untitled effects EffectIsVisible true EffectMoaID a7944db8 6ce2 11d1 8c76000502701850 ShadowAngle 315 ShadowBlur 4 ShadowColor 000000a6 ShadowDistance 7 ShadowType...

Page 54: ...nces the first style with that name 1 references the second and so on Returns Nothing Description Applies the specified style to the selection Example The following command applies the first style tha...

Page 55: ...text block and the other a shape the following command attaches the text block inside the shape s path fw getDocumentDOM attachTextInPath dom attachTextToPath Availability Fireworks 3 Usage dom attach...

Page 56: ...geCurrentPage pageNum Arguments pageNum An long value that specifies the page number of the page that will become the active page Returns Nothing Description Changes the currently active page to the s...

Page 57: ...dom changeNineScaleGuide Availability Fireworks CS3 Usage dom changeNineScaleGuide oldpos newpos guidekind Arguments oldpos A double precision value that specifies the current position of the guide ne...

Page 58: ...ibly deletes rectangular slices that do not abut the slice guide at currentPosition isSingleDrag A Boolean value that determines whether the operation is performed only on the selected slice or on all...

Page 59: ...ection to the clipboard Example The following command copies the selected items to the clipboard fw getDocumentDOM clipCopy dom clipCopyAsPaths Availability Fireworks MX Usage dom clipCopyAsPaths Argu...

Page 60: ...rator format Returns Nothing Description Copies the selection to the clipboard using the specified format dom clipCopyJsToExecute Availability Fireworks 9 Usage dom clipCopyJsToExecute string Argument...

Page 61: ...olutionDifferent is omitted or null ask user is assumed whatIfPastingIntoElementMask An optional argument added in Fireworks 4 that applies only if the user is editing an element mask and that element...

Page 62: ...is pasted as an image mask even if you pass vector maskReplaceOptions Acceptable values for maskReplaceOptions are replace if an element mask already exists replace it with the pasted one add if an e...

Page 63: ...e or into the specified channel of the selected image if any Example The following command copies the red data from the clipboard into the red channel fw getDocumentDOM clipPasteFromChannelToChannel r...

Page 64: ...items If the resolution of the clipboard contents doesn t match the resolution of the document Fireworks resamples the clipboard contents to match the document fw getDocumentDOM clipPasteInside resam...

Page 65: ...changes to the document are discarded Returns Nothing Description Closes the document dom convertAnimSymbolToGraphicSymbol Availability Fireworks 4 Usage dom converAnimSymbolToGraphicSymbol Arguments...

Page 66: ...he number of frames through which the symbol animates offsetDistPt A point that specifies the distance the animation will move in pixels see Point data type on page 8 For example passing x 100 y 25 an...

Page 67: ...tToPaths Arguments None Returns Nothing Description Converts the selected text items into editable paths Example The following command converts the selected text items into editable paths fw getDocume...

Page 68: ...fficients kernelHeight An integer that defines the height of the filter coefficients kernelValues An array of integers that defines the values for specific filter patterns affectsAlpha A Boolean value...

Page 69: ...optional string that specifies how to create hotspots if multiple items are selected Acceptable values for whatIfMultipleSelected are single creates a single hotspot that has the same bounding rectan...

Page 70: ...ity Fireworks 3 Usage dom cropSelection boundingRectangle Arguments boundingRectangle A rectangle that specifies the bounds within which the selection should be cropped see Rectangle data type on page...

Page 71: ...frames to delete Returns Nothing Description Deletes one or more frames dom deleteLayer Availability Fireworks 3 Usage dom deleteLayer layerIndex Arguments layerIndex An integer value that specifies t...

Page 72: ...ed starting with 0 although to specify the current contour pass 1 here pointIndex An integer value that specifies the point to be deleted starting with 0 although to specify the current point pass 1 h...

Page 73: ...sage dom deleteSelection bFillDeletedArea Arguments bFillDeletedArea This argument is ignored if Fireworks is not in bitmap mode If Fireworks is in bitmap mode and bFillDeletedArea is true the deleted...

Page 74: ...e instances are also deleted Returns Nothing Description Deletes the specified symbols from the library Example The following command deletes the selected symbols from the library as well as any activ...

Page 75: ...the layer will be detached Returns Nothing Description Detaches the specified shared layer from the specified page You can only detach a parent layer not a sub layer When the parent later is detached...

Page 76: ...frames of the document adding frames if necessary The first item on the layer goes to the first frame the second item to the second frame and so on New frames are added to the document if necessary If...

Page 77: ...ocation dom duplicateFrame Availability Fireworks 3 usage dom duplicateFrame frameIndex howMany where bDupeSelectionOnly Arguments frameIndex An integer value that specifies the frame to duplicate sta...

Page 78: ...l argument that specifies where to put the new layer s in relation to the source layer Acceptable values are beginning before current after current and end If omitted before current is assumed Returns...

Page 79: ...ion dom duplicateSelectionToFrameRange Availability Fireworks 3 Usage dom duplicateSelectionToFrameRange frameIndexFirst frameIndexLast Arguments frameIndexFirst and frameIndexLast Integer values that...

Page 80: ...new frame Returns Nothing Description Duplicates the selection to specified frames of the document dom duplicateSymbol Availability Fireworks 3 Usage dom duplicateSymbol symbol Arguments symbol The sy...

Page 81: ...election tool set left equal to right and top equal to bottom To find elements within a rectangle similar to drag selecting with the Pointer tool set the values to the desired rectangle Returns An arr...

Page 82: ...ted when this function is called Fireworks throws an exception dom enableNineScale Availability Fireworks CS3 Usage dom enableNineScale status Arguments status A Boolean value that toggles 9 slice sca...

Page 83: ...When newSelectionMask is not null the selection is set on the currently selected bitmap after entering paint mode This argument is null by default Returns Nothing Description Enters image edit mode on...

Page 84: ...the objects to be exported imagesUrl Folder name to which the image is exported Specified as file name Name of the image Returns Nothing Description Exports an array of elements on the canvas to a 32...

Page 85: ...escription Saves the values in dom exportOptions paletteEntries to the specified color panel ACT file This function does not modify the document For more information see ExportOptions object on page 2...

Page 86: ...if the Magic Wand tool were used at the clickPt location tolerance An integer between 0 and 255 inclusive that specifies the tolerance for selecting pixels edgemode Acceptable values are hard edge an...

Page 87: ...ection EffectMoaID 3439b08d 1922 11d3 9bde00e02910d580 hls_colorize true hue_amount 30 lightness_amount 0 saturation_amount 20 dom filterSelectionByID Availability Fireworks 8 Usage dom filterSelectio...

Page 88: ...log box dom findNamedElements Availability Fireworks 4 Usage dom findNamedElements name Arguments name A case sensitive string that specifies the exact element name to find To specify elements that ha...

Page 89: ...he Merge Images command dom getFontMarkup Availability Fireworks 3 Usage dom getFontMarkup fontAttribute Arguments fontAttribute Acceptable values for fontAttribute are size color and face Returns A s...

Page 90: ...refreshing Description Gets the pageSetter object which helps in changing pages without refreshing dom getParentLayerNum Availability Fireworks CS3 Usage dom getParentLayerNum currentLayer Arguments c...

Page 91: ...7 Description Gets the current pixel selection mask The result of this call could be used to call dom enableElementMask or dom enterPaintMode dom getSelectionBounds Availability Fireworks 3 Usage dom...

Page 92: ...s Arguments None Returns true if the guides are visible false otherwise Description Determines if the guides are visible dom getShowRulers Availability Fireworks 3 Usage dom getShowRulers Arguments No...

Page 93: ...urns true if the Snap to Grid function is active false otherwise Description Determines whether the Snap to Grid function is active dom getTextAlignment Availability Fireworks 3 Usage dom getTextAlign...

Page 94: ...dom ungroup see dom ungroup Example The following command sets the selected group to mask to the image replace with fw getDocumentDOM group normal dom hasCharacterMarkup Availability Fireworks 3 upda...

Page 95: ...lection Arguments None Returns Nothing Description Hides the selection To redisplay it use dom showAllHidden dom importFile Availability Fireworks 3 Usage dom importFile fileURL boundingRectangle bMai...

Page 96: ...Usage dom importSymbol fileURL bAddToDoc bAllowUI Arguments fileURL The name of the file to be imported into the library which is expressed as a file URL bAddToDoc If bAddToDoc is true the symbol is...

Page 97: ...xtracts the component elements from the selected symbol and places copies of those elements in the document dom importSymbolButNotAsAlias does not place in an instance in the document dom inLaunchAndE...

Page 98: ...path This function is similar to dom appendPointToPath but includes a tParameter argument which lets you control where the point is inserted See also dom appendPointToPath dom insertSmartShapeAt Avail...

Page 99: ...iption Inserts a symbol instance at the specified location dom insertText Availability Fireworks 8 Usage dom insertText text Arguments text The text to insert Returns Nothing Description Inserts the g...

Page 100: ...ct Arguments None Returns A Boolean value true if the selected objects are directly above an image element false otherwise Description Tests to see if the selected object s are directly above a bitmap...

Page 101: ...also dom knifeElementsFromPoints dom knifeElementsFromPoints Availability Fireworks 3 Usage dom knifeElementsFromPoints from to tolerance Arguments from A point that specifies the x y coordinates of t...

Page 102: ...masks are linked to their elements if false they are unlinked from their elements Returns Nothing Description Links or unlinks the element mask on the selected element If more than one element or no e...

Page 103: ...ty Fireworks 3 Usage dom MakeFind findSpec Arguments findSpec A Find object see Find object on page 19 Returns A Find object Description Creates an object of class Find to perform a search and replace...

Page 104: ...es the contour into which the B zier point is inserted For paths with multiple contours the contours are in an arbitrary order ptToModify A zero based index that specifies the point to be modified con...

Page 105: ...ect same as selecting the Filters Blur Motion Blur menu option to the selection dom moveBezierHandleBy Availability Fireworks 3 Usage dom moveBezierHandleBy whichPath contourIndex ptToModify deltaCont...

Page 106: ...elements in the selection have element masks an exception is thrown dom moveFillVectorHandleBy Availability Fireworks 3 Usage dom moveFillVectorHandleBy delta whichHandle bConstrain bMoveJustOne Argum...

Page 107: ...function moves the contents within the mask group by the specified amount If the selected element has an element mask this function moves the element not the element mask by the specified amount See a...

Page 108: ...down Returns Nothing Description Moves a bitmap mode selection by the specified amount without moving the pixels that are within the selection dom movePointOnHotspotBy Availability Fireworks 3 Usage...

Page 109: ...ing slices a unique name so their behaviors remain unaffected Returns Nothing Description If the selection is a hotspot or slice of the polyline variety this function moves a point on the hotspot s pa...

Page 110: ...scription Moves the selected items by the specified amount or makes a copy of them and offsets them from the original by the specified amount Example The following command moves the selected items rig...

Page 111: ...ription Moves or copies the selection to the specified location Example The following command copies only the selected parts of a path to the specified coordinates fw getDocumentDOM moveSelectionTo x...

Page 112: ...ltipleSelected is omitted or null ask user is assumed elementIndex A zero based index added in Fireworks 4 that specifies the element before which the moved or copied selection should be inserted If e...

Page 113: ...None Returns Nothing Description Performs a crop operation on the selected paths dom pathExpand Availability Fireworks 3 Usage dom pathExpand width miter cap join Arguments width A floating point valu...

Page 114: ...width of the selected paths in pixels miter A floating point value that specifies the new miter angle of the selected paths in pixels This argument is ignored if the value of join is not miter join Ac...

Page 115: ...e selected paths dom pathSimplify Availability Fireworks 3 Usage dom pathSimplify limit Arguments limit is a floating point value that specifies how much to simplify This value corresponds to the valu...

Page 116: ...e selected text inside the selected path If no text and path are selected no action occurs dom previewInBrowser Availability Fireworks MX Usage dom previewInBrowser primaryBrowser Arguments primaryBro...

Page 117: ...dom rebuildColorTable Arguments None Returns Nothing Description Rebuilds the color table for the current export settings of the document This is the same behavior as choosing Rebuild Color Table fro...

Page 118: ...Chrome Misc 011 fw getDocumentDOM redefineStyleByName Chrome Misc 011 Chrome Reflective 016 dom redo Availability Fireworks 3 Usage dom redo Arguments None Returns Nothing Description Reinstates the...

Page 119: ...tool dom reflectSelection Availability Fireworks 3 Usage dom reflectSelection bHoriz bVert opts Arguments bHoriz Boolean If true the items are reflected horizontally bVert Boolean If is true the item...

Page 120: ...gers the behavior This argument is ignored by Fireworks eventIndex An integer value that specifies the location of the behavior to be removed starting with 0 although to specify the end location pass...

Page 121: ...e dom removeElementMask whatIfElementIsAnImage Arguments whatIfElementIsAnImage This argument is used only if the element not the element mask is an image Acceptable values are apply apply the element...

Page 122: ...ability Fireworks 3 Usage dom removeFill Arguments None Returns Nothing Description Sets the fill of the selection to None dom removeGuide Availability Fireworks 3 Usage dom removeGuide position guide...

Page 123: ...us Arguments None Returns Nothing Description Removes 9 slice scaling from the selected symbol Example The following command removes 9 slice scaling from the selected symbol fw getDocumentDOM removeNi...

Page 124: ...reworks 3 new arguments added in CS3 Usage dom reorderLayer layerToMove layerToPutItBefore bMakeCopy posInLayer aboveBelowInto Arguments layerToMove A zero based index that specifies which layer to mo...

Page 125: ...Usage dom replaceButtonTextStrings newString uniformAttrs Arguments newString Specifies the string to be used as replacement text uniformAttrs Boolean If false each character retains the attributes of...

Page 126: ...ed Returns Nothing Description Replaces selected button text items with the specified string Button text items are defined as the topmost text items on each frame See also dom replaceButtonTextStrings...

Page 127: ...command resets 9 slice scaling for the selected symbol fw getDocumentDOM resetNineScale dom resizeSelection Availability Fireworks 3 Usage dom resizeSelection width height Arguments width and height...

Page 128: ...the from document is not specified the selection will be restored from the active document operation Operation to perform on the selection and on the document being loaded Acceptable values are new or...

Page 129: ...rotationAmount Acceptable values for rotationAmount are 90 180 and 270 Returns Nothing Description Rotates the entire document 90 180 or 270 clockwise Rotating 270 is the same behavior as rotating 90...

Page 130: ...Returns true if the save operation is successful false otherwise Description Saves the document in its default location After a successful save operation the document s isDirty property is cleared do...

Page 131: ...will save the selection with the name default toDocument Index of a currently open document where the selection will be saved This parameter is optional If toDocument is not specified Fireworks will...

Page 132: ...escription Scales the selection in the horizontal and vertical axes Example The following command scales the selected items to approximately two thirds 67 and automatically trims the images and transf...

Page 133: ...ixels the width of amount around the edge of the pixel selection Use smooth to smooth out the edge of the pixel selection by amount amount An integer specifying the amount by which to adjust Any integ...

Page 134: ...election of elements instead of simply selecting them This parameter is useful only if bRememberSelection is true Returns Nothing Description Selects all the items on the given layer in the current fr...

Page 135: ...Returns Nothing Description If Fireworks is in bitmap mode and a pixel selection is active this function feathers the selection by the specified number of pixels dom selectInverse Availability Firewor...

Page 136: ...ers of a group are selected the individual members are deselected and the group is selected See also dom selectChildren dom selectSimilar Availability Fireworks 3 Usage dom selectSimilar tolerance edg...

Page 137: ...mask see Point data type on page 8 tolerance An integer between 0 and 255 inclusive that specifies the tolerance for selecting pixels edgemode Acceptable values are hard edge antialias and feather fe...

Page 138: ...ersDisclosure Availability Fireworks 4 Usage dom setAllLayersDisclosure bDisclosed Arguments bDisclosed If bDisclosed is true all the elements on all layers appear in the Layers list If false only lay...

Page 139: ...Returns Nothing Description Sets the number of frames to animate the currently selected animation element See also dom convertToAnimSymbol dom setAnimInstanceOffsetDist Availability Fireworks 4 Usage...

Page 140: ...urns Nothing Description Sets the rotation amount in degrees to animate the currently selected animation element See also dom convertToAnimSymbol dom setAnimInstanceScaleAmount Availability Fireworks...

Page 141: ...he currently selected animation symbol See also dom convertToAnimSymbol dom setAnimInstanceStartFrame Availability Fireworks 3 deprecated in 4 in favor of placing the animation symbol on the frame in...

Page 142: ...bility Fireworks 3 Usage dom setBrush brush Arguments brush A Brush object see Brush object on page 236 Returns Nothing Description Sets the selection to the specified brush See also dom setBrushColor...

Page 143: ...the current name of the brush newName A string that specifies the new name of the brush Returns Nothing Description Renames a brush Does not change the brush category dom setBrushNColor Availability...

Page 144: ...Sets the selection to the specified brush brush color and brush texture See also dom setBrushColor dom setBrushPlacement Availability Fireworks 3 Usage dom setBrushPlacement placement Arguments placem...

Page 145: ...is not Returns Nothing Description If the user edits a Button document this function specifies whether to include the Down state in a button dom setButtonIncludeOverWhileDownState Availability Firewor...

Page 146: ...on page 253 URLString A string that specifies the URL for the button s altTagString and targetTagString Specify the text for the button alt tag and target tag sliceName A string that specifies the na...

Page 147: ...m setDefaultFillVector Arguments None Returns Nothing Description Sets the fill vector on the selection to the default dom setDocumentCanvasColor Availability Fireworks 3 Usage dom setDocumentCanvasCo...

Page 148: ...the current page is resized If it is false all pages of the document are resized The default value is true Returns Nothing Description Sets the document s canvas size to the specified rectangle and ap...

Page 149: ...ccordingly See also dom setDocumentCanvasSizeToDocumentExtents dom setDocumentImageSize Availability Fireworks 3 with additional argument added in Fireworks CS3 Usage dom setDocumentImageSize bounding...

Page 150: ...solution for the document see Resolution data type on page 8 Returns Nothing Description Sets the resolution of the document dom setEffectName Availability Fireworks MX Usage dom setEffectName categor...

Page 151: ...unlocked bAllLayers A Boolean value If true all layers are specified false otherwise bLockLayers A Boolean value If true locks all layers false otherwise Returns Nothing Description Sets the name of t...

Page 152: ...also returns an error if the selected element has no element mask dom setElementMaskShowAttrs Availability Fireworks 4 Usage dom setElementMaskShowAttrs bShow Arguments bShow Boolean If true the vecto...

Page 153: ...yer that contains the element s to be shown or hidden starting with 0 although to specify the current layer pass 1 here elementIndex An integer value that specifies the element s to show or hide start...

Page 154: ...the specified name an exception is thrown If the elements are hidden because they are on a hidden layer or frame for example this function does not show them See also dom findNamedElements dom setEle...

Page 155: ...object on page 258 Returns Nothing Description Sets the selection to the specified fill dom setFillColor Availability Fireworks 3 Usage dom setFillColor color Arguments color A color string see Color...

Page 156: ...r Availability Fireworks MX Usage dom setFillNColor fill color Arguments fill A Fill object see Fill object on page 258 color A color string see Color string data type on page 7 Returns Nothing Descri...

Page 157: ...n_Normal pattern null shape linear stampingMode blend opaque textureBlend 0 webDitherTransparent false 666666 Grain dom setFillPlacement Availability Fireworks 3 Usage dom setFillPlacement placement A...

Page 158: ...l vectors of the selection by moving the fill start to the specified point and then moving the two fill end handles to the same relative position dom setGradientName Availability Fireworks 3 Usage dom...

Page 159: ...e Availability Fireworks 3 Usage dom setGridSize gridSize Arguments gridSize A point that specifies the x y coordinates that are used for the document s grid size see Point data type on page 8 Returns...

Page 160: ...assumed The mask to image and mask to path values are deprecated in Fireworks 4 Returns Nothing Description Changes the group type of the currently selected groups dom setGuideColor Availability Firew...

Page 161: ...utes of the alt tag of the selected slices to This is my alt tag fw getDocumentDOM setHotspotAltTag slices This is my alt tag dom setHotspotColor Availability Fireworks 3 Usage dom setHotSpotColor wha...

Page 162: ...or copies it to the specified location at the specified size dom setHotspotShape Availability Fireworks 3 Usage dom setHotspotShape whatToSet shape Arguments whatToSet Acceptable values are hotspots s...

Page 163: ...alue is not null the URLs of all hotspots or slices in the document that have urlToMatch as their URL are changed to textString Note The URLs of both selected and unselected hotspots or slices are cha...

Page 164: ...s the layer regardless of which frame appears See also dom setAllLayersDisclosure dom setLayerLocked Availability Fireworks 3 Usage dom setLayerLocked layerIndex frameIndex bLock bAllLayers Arguments...

Page 165: ...LayerSharing Availability Fireworks 3 Usage dom setLayerSharing layerIndex sharedStatus bUnshareCopiesToAllFrames bWarnUser Arguments layerIndex An integer value that specifies the layer to be shared...

Page 166: ...de all the layers on a frame use the bAllLayers argument frameIndex An integer value that specifies the frame that contains the layer to be shown or hidden starting with 0 although to specify the curr...

Page 167: ...or is set to the value that is specified by matteColor If false any matte color is removed from the document and the second argument is ignored matteColor A color string see Color string data type on...

Page 168: ...sks specifies how the two masks should be combined Acceptable values for howToCombineMasks are replace add subtract and intersect Returns Nothing Description If Fireworks is in bitmap mode this functi...

Page 169: ...ween 0 and 100 inclusive Returns Nothing Description Sets the opacity of the selection to the specified value Example The following command sets the selected item to an opacity of 55 fw getDocumentDOM...

Page 170: ...ansform operation within Fireworks and then replaying the Transform step from the History panel while other items are selected Example The following command performs the transform operation on the sel...

Page 171: ...the rectangle as either a percentage value or or exact pixel value See also dom addNewRectanglePrimitive dom setRectSides dom setRectSides Availability Fireworks 4 Usage dom setRectSides newSides Arg...

Page 172: ...he selection in a single operation dom setSelectionMask Availability Fireworks 4 Usage dom setSelectionMask mask howToCombineMasks Arguments mask Specifies the mask to be applied see Mask data type on...

Page 173: ...wGammaPreview Availability Fireworks 3 Usage dom setShowGammaPreview bPreviewGamma Arguments bPreviewGamma Boolean If true the Preview Gamma option is turned on if false the option is turned off Retur...

Page 174: ...cription Specifies whether normal guides are visible dom setShowRulers Availability Fireworks 3 Usage dom setShowRulers bShow Arguments bShow Boolean If true the rulers are visible if false the rulers...

Page 175: ...ice overlay is not visible Returns Nothing Description Specifies whether the slice overlay is visible dom setSliceAutonaming Availability Fireworks 3 Usage dom setSliceAutonaming bAutoname Arguments b...

Page 176: ...eworks 3 Usage dom setSliceExportOptions exportOptions Arguments exportOptions An ExportOptions object see ExportOptions object on page 253 Returns Nothing Description Sets the export options for the...

Page 177: ...the color that is used to display slice guides To set the color of normal guides use dom setGuideColor See also dom setGuideColor dom setSliceHtml Availability Fireworks 3 Usage dom setSliceHtml html...

Page 178: ...pToGrid Availability Fireworks 3 Usage dom setSnapToGrid bSnap Arguments bSnap Boolean If true the tools snap to the grid if false they do not Returns Nothing Description Specifies whether tools snap...

Page 179: ...y not the document symbolType A string value Acceptable values are graphic button and animation newName A string value that specifies the new name for the symbol status A Boolean value that enables or...

Page 180: ...TextAutoKern bKern Arguments bKern Boolean If true automatic kerning is on for the selected text items if false automatic kerning is off Returns Nothing Description Specifies whether automatic kerning...

Page 181: ...mpling used to anti alias text in custom mode Returns Nothing Description Sets the oversampling used to anti alias text in custom mode dom setTextCustomAntiAliasSharpness Availability Fireworks MX 200...

Page 182: ...ght to left Returns Nothing Description Sets the horizontal flow direction of the selected text items dom setTextHorizontalScale Availability Fireworks MX Usage dom setTextHorizontalScale horizScale A...

Page 183: ...percentage leadingValue is a percentage of the default leading 1 0 is the default leading 0 5 is half the default leading and 2 0 is double the default leading Returns Nothing Description Sets the le...

Page 184: ...entation orientation Arguments orientation Acceptable values are horizontal left to right vertical right to left horizontal right to left and vertical left to right Returns Nothing Description Sets th...

Page 185: ...TextParaSpacingBefore Availability Fireworks MX Usage dom setTextParaSpacingBefore paraSpaceBefore Arguments paraSpaceBefore The number of pixels to move down before starting a new paragraph Returns N...

Page 186: ...and pixels Returns Nothing Description Sets the transform mode for the selected text instance items or both dom setTextRectangle Availability Fireworks 3 Usage dom setTextRectangle boundingRectangle...

Page 187: ...ordinates of the location at which the text box should be anchored see Point data type on page 8 How the point is used depends on the left to right and up to down orientation of the text flow in the t...

Page 188: ...shareLayerToPages Availability Fireworks CS3 Usage dom shareLayerToPages layerNum addToPages deleteFromPages Arguments layerNum A long value that indicates the layer number for the layer that is to b...

Page 189: ...splitPaths Availability Fireworks 3 Usage dom splitPaths Arguments None Returns Nothing Description Splits the selected paths Compound paths are split into separate contours dom swapBrushAndFillColors...

Page 190: ...ages autoTrimImages transformAttributes rememberQuad transformAttributes rememberQuad autoTrimImages rememberQuad and autoTrimImages transformAttributes rememberQuad Returns Nothing Description Transf...

Page 191: ...tion within that command Most but not all JavaScript functions cause an action to be executed that cannot be undone dom updateSymbol Availability Fireworks 3 Usage dom updateSymbol name Arguments name...

Page 192: ...items in the selection To group items use dom group See also dom group dom unsetMasterPage Availability Fireworks CS3 Usage dom unsetMasterPage Arguments None Returns Nothing Description Resets the do...

Page 193: ...ath to the directory that contains the Fireworks application which is expressed as file URL appExportSettingsDir string The path to the Export Settings directory which is expressed as file URL In Fire...

Page 194: ...sDir string The path to the Libraries directory which is expressed as file URL appTexturesDir string The path to the Textures directory which is expressed as file URL appXtrasDir string The path to th...

Page 195: ...system is connected to the Internet The Start Page has a dynamic content panel that loads content from the Internet The Start Page queries this property before attempting to download the dynamic conte...

Page 196: ...preter generates Use iso 8859 1 for ASCII or utf 8 for Unicode userJsCommandsDir string The path to the user level Commands directory which is expressed as a file URL In Fireworks this folder is store...

Page 197: ...ompatibility with Dreamweaver Returns The file URL selected by the user or null if the dialog box was canceled Description Displays an Open or Save dialog box to the user fw browseForFolderURL Availab...

Page 198: ...help topic in the help viewer fw checkFwJsVersion Availability Fireworks 3 Usage fw checkFwJsVersion version Arguments version An integer that is reserved for future use only a value of 0 is supported...

Page 199: ...not specify a maximum number of documents Returns An array of file URLs or null if the dialog box is canceled Description Displays a dialog box that lets the user choose the target documents for an op...

Page 200: ...Opens a new document and selects it Values for size resolution and color are the same as the current defaults To specify values other than the defaults use fw createFireworksDocument See also fw crea...

Page 201: ...or the newly created document see The Document object on page 27 Description Opens a new document and selects it Values for size resolution and color are explicitly specified To open a new document wi...

Page 202: ...urns Reloads the Common Library if you add a new widget etc You can reload the library from the JSF as well fw dialogs runEditGrids Availability Fireworks 3 Usage fw dialogs runEditGrids Arguments Non...

Page 203: ...rns Nothing Description Turns off debugging messages for Flash commands For a description of the Flash debugging capabilities see fw enableFlashDebugging on page 200 For more information about constru...

Page 204: ...Flash command calls MMExecute The fw enableFlashDebugging function is particularly useful for monitoring which commands are executed in a command panel For information on how to turn off Flash debugg...

Page 205: ...True if the document trims false otherwise Returns A Boolean value true if successful false otherwise Description Exports document as CSS layers and images The image names are based on the names in t...

Page 206: ...DocumentAs document fileURL exportOptions Arguments document A Document object for example fw documents 2 that specifies the document to be exported If document is null the active document is exported...

Page 207: ...the current document to the C images directory fw exportFrames null file C images fw exportHtmlAndImages Availability Fireworks 4 Usage fw exportHtmlAndImages doc htmlUrl imagesUrl Arguments doc A Do...

Page 208: ...ent fileURL Arguments document A Document object for example fw documents 2 that specifies the document to export If document is null the active document is exported fileURL Specifies the filename for...

Page 209: ...file which is expressed as a file URL If htmlUrlis null no MXML is generated imagesUrl The name of the file containing the exported image s which is expressed as a file URL and might not be null If a...

Page 210: ...t to the specified file in PDF format fw exportPSD Availability Fireworks 4 Usage fw exportPSD docObject PSDDocumentURL Arguments docObject A Document object that specifies the document to export see...

Page 211: ...PsdExport_Warn100 prevWarn fw setPref PsdExport_Layers prevLayers fw setPref PsdExport_Effects prevEffects fw setPref PsdExport_Text prevText fw exportSWF Availability Fireworks 4 Usage fw exportSWF...

Page 212: ...y fw setPref SwfJpegQuality 85 JPEG quality var prevFrameRate fw getPref SwfFrameRate fw setPref SwfFrameRate 5 frame rate fw exportSWF null file C new folder test swf Put the prefs back fw setPref Sw...

Page 213: ...t Arguments None Returns The number of items that are replaced if the search is completed or 1 if there are items in the document that remain to be searched Description Finds the next instance of the...

Page 214: ...Returns the hex value of blue color in the selected object fw getDocumentDOM Availability Fireworks 3 Usage fw getDocumentDOM which string Arguments which string An optional string that is included fo...

Page 215: ...ts the path and filename of the specified document fw getFamilyNameForPSFont Availability Fireworks 10 Usage fw getFamilyNameForPSFont font Arguments font Name of the PostScript font Returns The famil...

Page 216: ...stroke swatches layers frames behaviors optimize library styles optimized colors options and toolbox Note Any panels not specified in the list of valid arguments like those in the Command Panels folde...

Page 217: ...nel swf would be mypanel Returns A Boolean value true if the specified panel is visible false otherwise Description Determines whether a specified panel is visible fw getGreen Availability Fireworks M...

Page 218: ...ity Fireworks MX Usage fw getNumberOfTables filename Arguments filename The name of the file that contains the tables to be counted Returns A long integer that represents the number of tables in the d...

Page 219: ...scope of this documentation but the format of prefkey exactly matches that in the Fireworks Preferences file To set a Preference value use fw setPref Returns A string or numeric Preference value Desc...

Page 220: ...fw internalNameToUIName Availability Fireworks MX2 Usage fw internalNameToUIName internalname Arguments internalname Internal name to be mapped to a UI name Returns UI name string Description Convert...

Page 221: ...ly Description Starts an application using a file URL that is returned by fw findApp You can specify optionally files to open in the application See also fw findApp fw launchBrowserTo Availability Fir...

Page 222: ...of file URLs or null if the dialog box is canceled Description Displays a dialog box that lets the user select one or more files fw makeRGBColor Availability Fireworks MX Usage fw makeRGBColor red gre...

Page 223: ...argument is optional If fileURL is omitted or null the Open Document dialog box appears bOpenAsNew If bOpenAsNew which was added in Fireworks 4 is true the files are opened as unsaved and untitled do...

Page 224: ...ll findOpenDocument first See also fw findOpenDocument fw popupColorPicker Availability Fireworks MX Usage fw popupColorPicker screenLoc initialColor allowTransparent forceWeb216 Arguments screenLoc T...

Page 225: ...ils see Color string data type on page 7 allowTransparent A Boolean value that lets the user select a transparent color set to true for transparent false otherwise forceWeb216 A Boolean value that for...

Page 226: ...fw readNthTable filename tablenumber Arguments filename A fileURL for the file that contains the desired table tablenumber A long integer that specifies the desired table the tables are zero indexed...

Page 227: ...age fw reloadCommonLibrary Arguments None Returns Nothing Description Reloads the Common Library If the user adds new widget the library can be reloaded from the JSF as well fw replace Availability Fi...

Page 228: ...cription Performs a replace all operation on the active document using the current search and replace strings See also fw setUpFindReplace fw resetWarnings Availability Fireworks 4 Usage fw resetWarni...

Page 229: ...ity Fireworks 3 Usage fw runScript filename Arguments filename The name of the script file to execute If filename is not a file URL that is if it does not begin with file it is assumed to be the name...

Page 230: ...as PNG Returns Nothing Description Saves the specified document in the specified filename and format fw saveDocument Availability Fireworks 3 Usage fw saveDocument document fileURL Arguments document...

Page 231: ...ame To save a document to another format such as GIF or JPEG use fw exportDocumentAs See also fw exportDocumentAs fw saveDocumentCopyAs Availability Fireworks 3 Usage fw saveDocumentCopyAs document fi...

Page 232: ...writes the file using UTF 8 encoding and prepends the UTF 8 byte order mark to the file that is written fw setActiveViewScale Availability Fireworks MX Usage fw setActiveViewScale scale center Argumen...

Page 233: ...A lowercase string that specifies the panel into which the panelNameToMove panel should move If panelNameToReceive is null the panelNameToMove panel moves into its own panel Acceptable values are find...

Page 234: ...Panels folder which are outside the Fireworks application should be named exactly as they appear in the file system without their file extension For example the valid argument name for the Align pane...

Page 235: ...e the panel is hidden Returns Nothing Description Shows or hides the specified panel fw setHideAllFloaters Availability Fireworks 3 Usage fw setHideAllFloaters bHide Arguments bHide If bHide is true t...

Page 236: ...oggleFloater panelName Arguments panelName Acceptable values are find project log object info url effect history mixer fill stroke swatches layers frames behaviors optimize library styles optimized co...

Page 237: ...ed primitive objects with their equivalent paths The new objects have all the attributes mask stroke fill and so on of the replaced ones See also dom addNewRectanglePrimitive fw updateHTML Availabilit...

Page 238: ...mple The following command updates the images in an HTML file using the current document fw updateHTML null file C mysite nav htm true fw writePanelStateToFile Availability Fireworks MX Usage fw write...

Page 239: ...ted the Yes button false otherwise Description Displays a dialog box that contains buttons labeled Yes and No Example The following code displays a dialog box with Yes and No buttons and the message W...

Page 240: ...ere appropriate acceptable values and notes Property Data type Notes call string The JavaScript call for the behavior For legal values see Using the dom addBehavior function on page 31 event string Ac...

Page 241: ...the Brush property inspector stroke settings where hdir is the horizontal value and vdir is the vertical value and blackness is the build up of black pixels as some tools brush over the same spot rep...

Page 242: ...0 to 100 where x is a value of pressure speed hDir vDir or random and y is a value of size angle opacity blackness scatter hue lightness orsaturation For example sensitivity_pressure_size shape strin...

Page 243: ...dynamicInfo array Array of ContourNodeDynamicInfo objects on this ContourNode object for more information see ContourNodeDynamicInfo object on page 240 isCurvePoint Boolean If set to true this point...

Page 244: ...adjust properties as needed For a list of properties see RegisterMoveParms object on page 262 RegisterCircularMove point The center point for the circular movement object The RegisterMoveParms object...

Page 245: ...then adjust properties as needed For a list of properties see RegisterMoveParms object on page 262 RegisterLinearMove point A point which in combination with the node point defines the line to move a...

Page 246: ...idden The default value is true EffectMoaID string 7fe61102 6ce2 11d1 8c76000502701850 EmbossFaceColor string A color string that specifies the color that is blended onto the face of the object when e...

Page 247: ...ffects all use 1 but other values should work For example 0 5 gives a more subtle slope and 2 0 gives a sharper slope SlopeType integer flat slope 0 smooth slope 1 inverted smooth slope 2 frame 1 slop...

Page 248: ...tween 0 and 255 and the points must be sorted in ascending order of the points x coordinate values red_points green_points blue_points Property Data type Notes EffectIsVisible Boolean If set to false...

Page 249: ...alse 0 to 100 if hls_colorize is true lightness_amount integer 0 to 100 hls_colorize Boolean Specifies whether the effect should automatically colorize Default value is false Property Data type Notes...

Page 250: ...source_low_red source_high_red source_low_green source_high_green source_low_blue source_high_blue dest_low_rgb integer These dest values are all output levels to the filter with values of 0 to 255 de...

Page 251: ...true Property Data type Notes EffectMoaID string f1cfce44 718e 11d1 8c8200a024cdc039 EffectIsVisible Boolean If set to false the effect is included but temporarily hidden The default value is true un...

Page 252: ...alues 0 to 100 represent percent opacity rawLeft float Leftmost space occupied by the pixels not the left location of the bounding box rawTop float Top space occupied by the pixels not the top locatio...

Page 253: ...the transformation matrix is modified DontTransformAnyScale If the Auto Shape is scaled even nonuniformly the actual points are moved otherwise the transformation matrix is modified Method Parameter D...

Page 254: ...cifies the transformation matrix of a symbol instance transformMode string Acceptable values are paths and pixels urlText string The link text Property Data type Notes altText string Text that is writ...

Page 255: ...object for more information see PathAttrs object on page 261 randSeed float A 32 bit integer JavaScript integers hold only 31 bit numbers so it is stored as a floating point number textureOffset point...

Page 256: ...unding box rawHeight float Height of the area occupied by the pixels not the area of the bounding box Property read only Data type Notes name string The name that appears in the Brush or Fill panels P...

Page 257: ...limit If the value is negative specifies that the axis varies but can be no larger than abs value If one value is positive and one is negative the positive value is always used This gives the followi...

Page 258: ...an The default value is false cropBottom integer The default value is 0 cropLeft integer The default value is 0 cropRight integer The default value is 0 cropTop integer The default value is 0 ditherMo...

Page 259: ...aletteMode string Acceptable values are adaptive the default custom grid monochrome Macintosh Windows exact and Web 216 paletteTransparencyType string Acceptable values are none the default index inde...

Page 260: ...at Fireworks generates during export Use iso 8859 1 for ASCII or utf 8 for Unicode docXHTMLFormat Boolean Determines whether Fireworks outputs XHTML formatted files true or HTML formatted files false...

Page 261: ...is first b is second and so on numeric1 generates a unique number 1 is first 2 is second and so on numeric01 generates a unique two digit number 01 is first 02 is second and so on doc name name of the...

Page 262: ...he period character space the space character hyphen the hyphen character sliceUsingUrls Boolean If set to true use slice objects for slicing and sliceAlongGuides should be set to false templateName s...

Page 263: ...sed instead Property Data type Notes delay integer Hundredths of a second disposal string Acceptable values are unspecified none background and previous layers array Array of FrameNLayerIntersection o...

Page 264: ...dientNode objects see GradientNode object on page 260 opacityNodes array Array of GradientNode objects see GradientNode object on page 260 that identify the opacity ramp associated with a gradient Pro...

Page 265: ...are normal and web name string Might be null removes any existing name sharing string Acceptable values are shared and not shared Property Data type Notes brush object Brush object see Brush object o...

Page 266: ...ctangle primitives remember transformations the user might see something different from the original sides mode string Specifies the roundness units which can be relative percentage or exact pixels tr...

Page 267: ...in movement to the nearest 90 increment Can be one of the following none shiftKey ctrlCmdKey altOptKey A key value of none means dragging will not be constrained shiftKey or other key means that when...

Page 268: ...user holds downs the Shift key while dragging the mouse rotation is not constrained incrementRadius float Constant value that is added to the radius incrementX float This amount is added to the x mov...

Page 269: ...ontained in this run Property Data type Notes altOptKeyDown Boolean Indicates whether the Alt Option key is pressed true if pressed otherwise false constrainDragInsertAspect Boolean Determines if whil...

Page 270: ...key is pressed Method Parameter Definition GetDefaultMoveParms object Returns an object that has all of the default move parameters set Property read only Data type Notes effectList object EffectList...

Page 271: ...applies the textFont property of the PathAttrs object when applying the style If set to false ignores the textFont property The default value is false use_textSize Boolean If set to true applies the...

Page 272: ...er The exact effect of this property number depends on the value of the leadingMode property leadingMode string The only acceptable value is percentage which specifies that the leading property is a p...

Page 273: ...olor at the specified position in the gradient see Color string data type on page 7 element pathattrs fill gradi ent position integer A value that specifies a position within the gradient fill element...

Page 274: ...lues and notes All BehaviorInfo object properties are read only Property read only Data type Notes action integer Specifies the type of behavior 1 is Status Message 2 is Swap Image 4 is Button Down 5...

Page 275: ...cifies if the status text is not empty hasTargetFrame Boolean If action is set to 2 Swap Image specifies if the swap image swaps is in another frame in the Fireworks file The value of hasTargetFrame i...

Page 276: ...n is set to 1 Status Message specifies the status message text submenuRelativeToItem Boolean Specifies whether the submenu is relative to the menu item targetColumnNum zero based index If action is se...

Page 277: ...nu specifies the point size for the menu text textUpColor string If action is set to 9 Popup Menu specifies the menu text color for the Up state vertical Boolean If action is set to 9 Popup Menu speci...

Page 278: ...user exports a file emptyCellColor string A color string that specifies the color of empty table cells see Color string data type on page 7 emptyCellContents integer Specifies what to put into empty...

Page 279: ...p startColumn integer Used only in the Metafile htt file for generating HTML for one slice Specifies the column of the slice startRow integer Used only in the Metafile htt file for generating HTML for...

Page 280: ...Set to true if the slice has a URL hasTargetText Boolean Set to true if the target text is not empty href string The URL link for this slice which is expressed as file URL left string Left coordinates...

Page 281: ...ct BehaviorsList object that contains the behaviors for this slice see BehaviorsList object on page 273 cellHeight integer Height of this table row in pixels cellWidth integer Width of this table colu...

Page 282: ...ee Slices object on page 279 Set to null if the cell does not contain a nested table rowSpan integer Span of the row setFrameFileName frameIndex zero based index Sets the filename for the slice on the...

Page 283: ...x Index for each file generated for multiple file button export doDemoHTML Boolean Corresponds to the Export Multiple Nav bar HTML Files check box in the Document Specific tab of the HTML Setup dialog...

Page 284: ...objects Last updated 12 8 2009 shimPath string Relative URL to the shim GIF file for example images shim gif tableNested Boolean Specifies if the table is nested width string Specifies the slice width...

Page 285: ...opping rotating adjusting color blurring and almost all Fireworks operations without leaving the current application or opening Fireworks XML and remote procedure calls Applications written with Flash...

Page 286: ...f the operation to perform The object on which the operation is performed Any parameters the operation needs Note XML requests are specially formatted XML document fragments not full XML documents XML...

Page 287: ...must contain a valid object ID When an object that can be accessed through RPC is created it is assigned a unique object ID The object retains that ID for its entire lifetime This happens for all RPC...

Page 288: ...data type it is simply a container for other data nodes Each direct child node of a dictionary node must contain an additional key attribute The key attribute is a string and must be unique for the gi...

Page 289: ...contain one of the values listed in the following table RPC and the Fireworks JavaScript DOM The RPC server does not allow for self discovery of the server classes and their methods Instead the clien...

Page 290: ...rtain classes can also have dynamic properties The Fireworks Object Model on page 6 documents dynamic properties and specifies whether the dynamic properties are read only Most dynamic properties are...

Page 291: ...ed and then used If the client creates a dictionary all properties of the class must be added to the dictionary with the correct type point dictionary dict double key x value 300 4 double key y value...

Page 292: ...s behalf are released Note Objects are not destroyed until the client releases them or until the client that created them disconnects from the server RPCMethods class To use remote procedure calls Fl...

Page 293: ...Usage RPCMethods AddToAutoReleasePool proxyObject Arguments proxyObject The object to add to the current pool Returns Nothing Description Adds an object to the current auto release pool This function...

Page 294: ...elease block and calling the DestroyAutoReleasePool function marks the end Any object allocated between these two calls is released by calling DestroyAutoReleasePool Using these two functions you can...

Page 295: ...rt the button in the first frame in the middle of the Stage 6 Attach the following ActionScript code to the button to activate the RPC code when the button is clicked on press RPCMethods CreateAutoRel...

Page 296: ...prompt dialog boxes supported in previous versions You can add command panels to Fireworks for image enhancements object manipulation or other custom functionality How Flash panels and commands work A...

Page 297: ...nds You can call any part of the Fireworks API by embedding the API commands in the following functions These functions communicate directly with Adobe Flash Player which is distributed with Fireworks...

Page 298: ...orks function in MMExecute you can use a series of fwapi functions in the ActionScript Then when it is published the wrapper translates the fwapi functions into the expanded Fireworks functions You ca...

Page 299: ...efore Fireworks stops the file and possibly unloads it onFwUnitsChange Sent when the user changes the type of units inches pixels centimeters in the Info panel onFwPICollapseOrExpand Sent when the use...

Page 300: ...ied onFwPreferencesChange Sent when the preferences are changed onFwDocumentOpen Sent when the document is opened onFwDocumentClosed Sent when the document is closed onFwDocumentSave Sent when a save...

Page 301: ...ableFlashDebugging Use the Flash debugging functions to show or hide everything that the Shockwave file passes to the Fireworks API during execution Place these debug functions around the suspect code...

Page 302: ...anipulates the Auto Shape The Auto Shape file also contains control points and properties stroke fill color and so on that define the shape s behaviors appearance and effects The points and functions...

Page 303: ...elem elements 0 contours 0 nodes 2 new ContourNode smartShape elem elements 0 contours 0 nodes 2 predX 200 smartShape elem elements 0 contours 0 nodes 2 predY 125 smartShape elem elements 0 contours...

Page 304: ...ar cp smartShape elem controlPoints smartShape elem controlPoints length 1 Place the Control Point cp x 0 cp y 0 Handling the user interaction After you define the Auto Shape properties and control po...

Page 305: ...ect properties at various stages of a drag operation at the beginning of the operation during the operation and at its end If you define only the properties for the end result Fireworks waits until th...

Page 306: ...ves the mouse for example using the RegisterMove method of the SmartShape object for more information about how to get the properties of a smartShape object see ContourNode object on page 239 or wait...

Page 307: ...eries of functions to handle the Fireworks messages as the user interacts with the shape The file also includes a series of commands and functions defining the shape s properties and other functionali...

Page 308: ...ommon Library Custom Symbols folder Windows or user name Application Support Adobe FireworksCS4 Common Library Custom Symbols Macintosh To create a rich symbol a JavaScript file must be created and sa...

Page 309: ...loads first time In this case Blue will be the default color when the Rich symbol is used Color is the Type of Parameter that is displayed Color will invoke the Color Popup box in the Symbol Properti...

Page 310: ...illTexture object element pathattrs fillHandle1 point element pathattrs fillHandle2 point element pathattrs fillHandle3 point element pathattrs setDefaultFillHandles point element pathattrs brushPlace...

Page 311: ...pathattrs brush name string element pathattrs brush angle long element pathattrs brush aspect integer element pathattrs brush diameter long element pathattrs brush maxCount long element pathattrs bru...

Page 312: ...pathattrs mask element object element pathattrs mask owner object element pathattrs mask linkled boolean element pathattrs mask enabled boolean element pathattrs mask mode string element pathattrs mas...

Page 313: ...MXML data 1 Choose File Export 2 Choose MXML and Images in the Export pop up menu 3 Select the Put images in subfolder option if you want to save the images in a separate folder from the MXML code 4 S...

Page 314: ...When you create a custom rich symbol you must define the flexClassName property if you want the MXML and Images export to treat the rich symbol as an MXML tag and not an exported image The class name...

Page 315: ...apply to the MXML definition of the exported element It consists of two integer properties width and height which are measured in pixels and are added to the MXML width and height attributes This does...

Page 316: ...urrentValues or customValues but are automatically determined and generated by the MXML export This includes the following properties x x position of the element on the screen y y position of the elem...

Page 317: ...ame label type Text value Star currValues push name color type Color value FFFFFF currValues push name enabled type Boolean value true Widget elem customData currentValues currValues Widget elem custo...

Page 318: ...rts as a Star MXML tag Notice how the properties defined within attributeProperties became attributes and the property color defined within styleProperties became part of the Star style The only defau...

Page 319: ...Fireworks with the menus tools or floating panels can be done programmatically using JavaScript Property inspector functions These functions control the Property inspector window which shows details...

Page 320: ...oolean value true if expanded false otherwise Description Determines whether the Property inspector window is currently expanded or minimized fw isPIVisible Availability Fireworks MX Usage fw isVisibl...

Page 321: ...PIWindow Availability Fireworks MX Usage fw shrinkPIWindow Arguments None Returns Nothing Description Minimizes the Property inspector window fw setPIPosition Availability Fireworks MX Usage fw setPIP...

Page 322: ...details which contains the location of the Property inspector Description Retrieves the location in screen coordinates of the upper left corner of the Property inspector window History panel function...

Page 323: ...history steps to the Clipboard fw historyPalette getSelection Availability Fireworks 3 Usage fw historyPalette getSelection Arguments None Returns A zero based array that represents which History pan...

Page 324: ...n Gets the JavaScript equivalent of the specified steps See also fw historyPalette replaySteps fw historyPalette getUndoState Availability Fireworks 3 Usage fw historyPalette getUndoState Arguments No...

Page 325: ...e saveAsCommand Availability Fireworks 3 Usage fw historyPalette saveAsCommand array of indexes filename Arguments array of indexes Indicates which steps from the History panel should be saved For exa...

Page 326: ...the History panel that is selected fw historyPalette setUndoState Availability Fireworks 3 Usage fw historyPalette setUndoState undoStateString Arguments undoStateString The string returned by fw hist...

Page 327: ...ull Description Looks for a set of export settings that were saved with the specified name document makeGoodNativeFilePath Availability Fireworks 3 Usage document makeGoodNativeFilePath fileURL Argume...

Page 328: ...36 BehaviorInfo object 270 BehaviorsList object 273 Bevel properties Effect object 241 Blur More properties Effect object 241 Blur properties Effect object 241 breakLink 52 Brightness properties Effec...

Page 329: ...achTextToPath 51 dom breakLink 52 dom changeCurrentPage 52 dom changeGuide 52 dom changeNineScaleGuide 53 dom changeSliceGuide 53 dom clearJPEGMask 54 dom clipCopy 55 dom clipCopyAsPaths 55 dom clipCo...

Page 330: ...up 117 dom removeElementMask 117 dom removeFill 118 dom removeFontMarkup 117 dom removeGuide 118 dom removeNineScale 119 dom removeTransformation 119 dom reorderFrame 119 dom reorderLayer 120 dom reor...

Page 331: ...rength 17 7 dom setTextFlow 178 dom setTextHorizontalScale 178 dom setTextLeading 179 dom setTextOnPathMode 179 dom setTextOnPathOffset 179 dom setTextOrientation 180 dom setTextParaIndent 180 dom set...

Page 332: ...bject 259 frameIndex argument 8 FrameNLayerIntersection object 259 func 283 fw and fireworks class names 192 fw browseDocument 192 fw browseForFileURL 193 fw browseForFolderURL 193 fw browseHelp 194 f...

Page 333: ...15 getRed 215 getRootDirectory 9 getSelection 319 getSelectionBounds 87 getShowGrid 87 getShowGuides 88 getShowRulers 88 getSnapToGrid 89 getSnapToGuides 88 getStepCount 319 getStepsAsJavaScript 320 g...

Page 334: ...bject Behavior 236 BehaviorInfo 270 BehaviorsList 273 Brush 236 Contour 239 ContourNode 239 ContourNodeDynamicInfo 240 ControlPoint 240 Effect 241 EffectList 247 Element 247 ElementMask 252 Errors 16...

Page 335: ...d 23 saveDocument 226 saveDocumentAs 227 saveDocumentCopyAs 227 saveJPEGMask 126 saveJsCommand 228 saveSelection 127 scaleSelection 128 scalingGridRect 128 selectAdjustPixelSel 129 selectAll 129 selec...

Page 336: ...tCustomAntiAliasSharpness 177 setTextCustomAntiAliasStrength 177 setTextFlow 178 setTextHorizontalScale 178 setTextLeading 179 setTextOnPathMode 179 setTextOnPathOffset 179 setTextOrientation 180 setT...

Reviews: