Adobe 38039927 - Fireworks CS3 - PC Extended User Manual
Adobe 38039927 - Fireworks CS3 - PC Extended User Manual

Adobe 38039927 - Fireworks CS3 - PC Extended User Manual

Extending fireworks
Hide thumbs Also See for 38039927 - Fireworks CS3 - PC:
Table of Contents

Advertisement

EXTENDING FIREWORKS

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 38039927 - Fireworks CS3 - PC and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Adobe 38039927 - Fireworks CS3 - PC

  • Page 1 EXTENDING FIREWORKS...
  • Page 2 The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorpo- rated.
  • Page 3: Table Of Contents

    Contents Chapter 1: Extending Fireworks Overview Prerequisites ................1 Installing an extension .
  • Page 4 PathAttrs object ............... . 236 Pattern object .
  • Page 5: Chapter 1: Extending Fireworks Overview

    Chapter 1: Extending Fireworks Overview To extend Adobe® Fireworks® CS3, you must write JavaScript code. You can use JavaScript to write your own objects and commands that affect Fireworks documents and the elements within them. To accomplish these tasks, you must be proficient in JavaScript and in Fireworks.
  • Page 6: What's New In Extending Fireworks Cs3

    ADOBE FIREWORKS CS3 Extending Guide You cannot begin using some extensions until you restart Fireworks. If you are running Fireworks when you install the extension, you might be prompted to quit and restart the application. To view basic information on the extension after its installation, go to the Extension Manager (Commands >...
  • Page 7: Additional Resources For Extension Writers

    Extending Guide • The visitor refers to the person who views the graphic that the user created. Additional resources for extension writers To communicate with other developers who are writing extensions, you can visit the Adobe online forums at www.adobe.com/support/forums/.
  • Page 8: Chapter 2: The Fireworks Object Model

    Chapter 2: The Fireworks Object Model If you want to extend the functionality of Adobe Fireworks CS3 by writing or modifying a JavaScript extensibility file, you must become familiar with the objects that Fireworks makes available through JavaScript. The hierarchy of these objects comprises the Fireworks Object Model, which contains the following major components: •...
  • Page 9 ADOBE FIREWORKS CS3 Extending Guide fw.documents[2].brushes[4].shape = "square"; The preceding example includes the following properties: • is a property of the Fireworks object and contains an array of Document objects. documents • is a property of the Document object and contains an array of Brush objects.
  • Page 10: Using Fireworks Api Functions

    ADOBE FIREWORKS CS3 Extending Guide Matrix data type The format for a matrix is {matrix: [float, float, float, float, float, float, float, float, . This guide assumes that you know how to use these nine values to construct a three-by-three transfor- float]} mation matrix;...
  • Page 11: Using The Common Api

    Using the common API You can use the common Adobe API if you want commands to use a common syntax (and thus run a single command in multiple applications). You can access this API using .The following methods are...
  • Page 12 ADOBE FIREWORKS CS3 Extending Guide • RectanglePrimitive • PathAttrs • Image To test whether a text block is selected, type the following code: firstSelection = fw.selection[0]; if (firstSelection == "[object Text]"){ alert("I am a text block"); You can use the information in the following sections to return or set property values.
  • Page 13 ADOBE FIREWORKS CS3 Extending Guide To return the name of the first effect that is applied to the selected object, type the following code: effectName=fw.selection[0].effectList.effects[0].name; Working with specific properties for selected elements Some elements have specific properties that can be returned in addition to those that can be returned for any selected object (for more information, see “Working with properties for any selected object”...
  • Page 14 ADOBE FIREWORKS CS3 Extending Guide Group • elements • groupType To return the number of objects in a selected group, type the following code: numOfObjectsinGroup = fw.selection[0].elements.length; Instance • symbolID • transformMode • instanceType • urlText • altText • targetText...
  • Page 15: Global Methods

    ADOBE FIREWORKS CS3 Extending Guide pathAttributes Several objects have the property. The following list is the valid set of pathAttributes pathAttributes properties that can be returned or set: • brushColor • fillColor • brush • fill • brushTexture • fillTexture •...
  • Page 16 ADOBE FIREWORKS CS3 Extending Guide confirm(message) Availability Fireworks 3. Usage confirm(message) Arguments A string containing the message to display. message Returns True if OK is clicked, false if Cancel is clicked. Description Displays a string in a modal alert box, along with OK and Cancel buttons.
  • Page 17: Core Objects

    ADOBE FIREWORKS CS3 Extending Guide Description Same as WRITE_HTML; WRITE_HTML was created to let you differentiate HTML output calls from other JavaS- cript calls in your code. WRITE_CSS Availability Fireworks 3. Usage WRITE_CSS Arguments None. Returns An output file. Description Available only when exporting.
  • Page 18 ADOBE FIREWORKS CS3 Extending Guide Errors object object properties are read-only strings that are used to simplify the localizing of scripts. They return Errors localized error messages appropriate to the specific error. For example, the English version of Fireworks returns for the property.
  • Page 19 ADOBE FIREWORKS CS3 Extending Guide Method Data type Notes string Returns an array of file URLs. If enumFiles(docOrDir) docOrDir a directory, the array contains an entry for every file or directory that is contained in the specified directory. If docOrDir is a file, the array contains a single entry (the file passed in).
  • Page 20 ADOBE FIREWORKS CS3 Extending Guide Method Data type Notes string, Boolean The first argument must be expressed as open(docname, bWrite) file://URL. Opens the specified file for reading or writing. If the second argument is , the file true opens for writing; otherwise it opens for reading.
  • Page 21: Find Object

    ADOBE FIREWORKS CS3 Extending Guide Find object There are several ways to specify a Find object, depending on what you want to find and replace. Use the property to specify the type of find operation, along with the properties that are associated with each...
  • Page 22 ADOBE FIREWORKS CS3 Extending Guide Finding and replacing colors, fills, strokes, and effects Property Data type Notes string In the format: whatToFind "color" string A color string that specifies the color to find (for more find information, see “Color string data type” on page 5).
  • Page 23 ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes string Returns the name of the operating system under osName which Fireworks is running. string Returns the system color used for the control and controlFaceColor panel faces (Windows-only property). string...
  • Page 24: Chapter 3: The Document Object

    Chapter 3: The Document object This chapter describes the Fireworks Document object and functions. The following table lists the properties of the Document object, along with their data types, acceptable values and notes. Read-only properties are marked with a bullet (•). You can also use many API calls to work with documents. For more information, see “Property inspector functions”...
  • Page 25 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes integer –1 — don’t repeat frameLoopingCount 0 — repeat forever > 0 — repeat this number of times array Array of Frame objects in the document (for more frames • information, see “Frame object” on page 234).
  • Page 26 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes array An array of objects in the document (for more layers • Layer information, see “Layer object” on page 236). integer Coordinate of the left edge of the document, in pixels.
  • Page 27: Document Functions

    The software used to create the document. The current version of Fireworks always Software sets this value to “Adobe Fireworks CS3. ” You can edit these or add your own fields, and they will be preserved across file saves. The pngText object corresponds directly to the chunk of the document’s PNG structure.
  • Page 28 ADOBE FIREWORKS CS3 Extending Guide Arguments A string that specifies the behavior to be added, such as . For a list of all the action "MM_swapImageRestore()" behaviors that can be added, see “Using the dom.addBehavior() function” on page 24. The event that triggers the behavior. Acceptable values are event "onMouseOver"...
  • Page 29 ADOBE FIREWORKS CS3 Extending Guide • is a binary value that specifies whether to preload the swapped image (pass ) or not (pass preload Description Sets a navigation bar Down behavior. Example fw.getDocumentDOM().addBehavior("MM_nbGroup(\'down\',\'navbar1\',-1,2,\"\",1)", "onClick", -1); MM_nbGroup [highlight] Availability Fireworks 3.
  • Page 30 ADOBE FIREWORKS CS3 Extending Guide • Pass "all" type • is a binary value that specifies whether the image should be highlighted on a mouse Down action downHighlight (pass ) or not (pass • is a binary value that specifies whether the image should initially appear as in the Down state...
  • Page 31 ADOBE FIREWORKS CS3 Extending Guide Example fw.getDocumentDOM().addBehavior("MM_statusMessage(\"Status Message!\")", "onMouseOver", - MM_swapImage Availability Fireworks 3. Arguments target, swapFrame, fileName, preload, restoreOnMouseOut • specifies the slice to which the behavior is attached. Pass for this value; all other values are used inter- target –1...
  • Page 32 ADOBE FIREWORKS CS3 Extending Guide Arguments Acceptable values for are " mode mode reveal all", "hide all", "reveal selection", . If the user is not in bitmap mode, or if there is no pixel selection, "hide selection" "reveal selection" operate the same as , respectively.
  • Page 33 ADOBE FIREWORKS CS3 Extending Guide Usage dom.addGuide(float position, guidekind) Arguments A floating-point value that specifies the x or y coordinate at which to add the guide. position Acceptable values for . If guidekind guidekind "horizontal" "vertical" guidekind , it is assumed that is a y coordinate;...
  • Page 34 ADOBE FIREWORKS CS3 Extending Guide A rectangle that specifies the bounds within which the Hotspot is placed (see “Rectangle boundingRectangle data type” on page 6). Returns Nothing. Description Adds a new Hotspot that fits into the specified bounding rectangle. Example The following command adds a new rectangle slice with the specified coordinates: fw.getDocumentDOM().addNewHotspot("slice","rectangle",{left:0, top:0, right:50,...
  • Page 35 ADOBE FIREWORKS CS3 Extending Guide Arguments None. Returns Nothing. Description Adds a new image to the document containing 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 new bitmap appears with Fireworks in paint mode.
  • Page 36 ADOBE FIREWORKS CS3 Extending Guide Example The following command adds a new unshared layer with a default name that is generated by Fireworks: fw.getDocumentDOM().addNewLayer(null, false); dom.addNewLine() Availability Fireworks 3. Usage dom.addNewLine(startPoint, endPoint) Arguments Points that specify the x,y coordinates between which the path is added (see “Point...
  • Page 37 ADOBE FIREWORKS CS3 Extending Guide fw.getDocumentDOM().addNewOval({left:72, top:79, right:236, bottom:228}); dom.addNewPage() Availability Fireworks CS3. Usage dom.addNewPage() Arguments None Returns Nothing. Description Adds a new page to the current document. dom.addNewRectangle() Availability Fireworks 3. Usage dom.addNewRectangle(boundingRectangle, roundness) Arguments A rectangle that specifies the bounds within which the new rectangle is added (see boundingRectangle “Rectangle data type”...
  • Page 38 ADOBE FIREWORKS CS3 Extending Guide dom.addNewRectanglePrimitive() Availability Fireworks 4. Usage dom.addNewRectanglePrimitive(boundingRectangle, roundness) Arguments A rectangle that specifies the bounds within which the new rectangle primitive is added (see boundingRectangle “Rectangle data type” on page 6). A floating-point value between 0 and 1 that specifies the “roundness” to use for the corners (0 is no roundness roundness, and 1 is 100% roundness).
  • Page 39 ADOBE FIREWORKS CS3 Extending Guide Description Adds a new path that consists of a single Bezier point. The path uses the default fill, stroke, and so on, and is added on the current frame and layer. The point is selected after it is added.
  • Page 40 ADOBE FIREWORKS CS3 Extending Guide A string that specifies the name for the new sub layer. If , a new layer name is generated. name name null A Boolean value that specifies whether the new sub layer is shared. shared Returns A string value that contains the name of the new sub layer.
  • Page 41 ADOBE FIREWORKS CS3 Extending Guide Arguments A rectangle that specifies the bounds within which to place the new text box (see “Rectangle boundingRectangle data type” on page 6). , the default values for all style properties are used. If it is...
  • Page 42 ADOBE FIREWORKS CS3 Extending Guide • If a document has slices, adjusts the size of all exported images so that the sum of the sizes is greater sizeInBytes than or equal to sizeInBytes Specifies whether the export file size can be increased.
  • Page 43 ADOBE FIREWORKS CS3 Extending Guide dom.appendPointToHotspot() Availability Fireworks 3. Usage dom.appendPointToHotspot(pt, tolerance) Arguments A point that specifies the x,y coordinates of the point to be added (see “Point data type” on page 6). A floating-point value > = 0 that specifies the tolerance between the new point and the starting point tolerance of the polyline path.
  • Page 44 ADOBE FIREWORKS CS3 Extending Guide dom.appendPointToSlice() Availability Fireworks 3. Usage dom.appendPointToSlice(pt, tolerance) Arguments A point that specifies the x,y coordinates of the point to be added (see “Point data type” on page 6). A floating-point value > = 0 that specifies the tolerance between the new point and the starting point tolerance of the polyline path.
  • Page 45 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Applies the document’s current fill to the selection. Example The following command applies the current fill to the selection: fw.getDocumentDOM().applyCurrentFill(true); dom.applyEffects() Availability Fireworks 3. Usage dom.ApplyEffects(effectList) Arguments An EffectList object (see “EffectList object” on page 221). If...
  • Page 46 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Applies the specified font markup attribute to the selected text. dom.applyStyle() Availability Fireworks 3. Usage dom.applyStyle(styleName, styleIndex) Arguments A string that specifies the style name to be applied. styleName An index to the style to apply. This is usually zero. However, if there are multiple styles with the same...
  • Page 47 ADOBE FIREWORKS CS3 Extending Guide Example The following command brings the selected items to the front: fw.getDocumentDOM().arrange("front"); dom.attachTextToPath() Availability Fireworks 3. Usage dom.attachtTextToPath() Arguments None. Returns Nothing. Description Attaches the selected text to the selected path. If no text and path are selected, no action occurs.
  • Page 48 ADOBE FIREWORKS CS3 Extending Guide Usage dom.changeGuide(currentPosition, newPosition, guidekind) Arguments A floating-point value that specifies the current position of the guide. currentPosition A floating-point value that specifies the new position of the guide. newPosition Acceptable values for . If guidekind guidekind "horizontal"...
  • Page 49 ADOBE FIREWORKS CS3 Extending Guide dom.changeSliceGuide() Availability Fireworks MX. Usage dom.changeSliceGuide(currentPosition, newPosition, guidekind, isMagneticDrag, isSingleDrag) Arguments A floating-point value that specifies the current position of the slice guide to be moved. currentPosition A floating-point value that specifies the new position of the slice guide.
  • Page 50 The following command copies the selected items to the Clipboard: fw.getDocumentDOM().clipCopy(); dom.clipCopyAsPaths() Availability Fireworks MX. Usage dom.clipCopyAsPaths() Arguments None. Returns Nothing. Description Copies the selection to the Clipboard in Adobe Illustrator format. Example The following command copies the selected items to the Clipboard in Adobe Illustrator format: fw.getDocumentDOM().clipCopyAsPaths();...
  • Page 51 ADOBE FIREWORKS CS3 Extending Guide dom.clipCopyFormats() Availability Fireworks MX. Usage dom.clipCopyFormats(format) Arguments The graphics format for the selection. For example, is the Adobe Illustrator format. format "AICB" Returns Nothing. Description Copies the selection to the Clipboard using the specified format. dom.clipCut() Availability Fireworks 3.
  • Page 52 ADOBE FIREWORKS CS3 Extending Guide Arguments An optional string that specifies how resampling should be done if the resolution whatIfResolutionDifferent of the Clipboard contents doesn’t match the resolution of the document. Acceptable values for whatIfResolu- , and (displays a dialog box to let the user tionDifferent "resample"...
  • Page 53 ADOBE FIREWORKS CS3 Extending Guide Description Pastes the Clipboard contents into the document as an element mask. Only one element can be selected when calling this function. If more than one element (or none) is selected when this function is called, Fireworks throws an exception.
  • Page 54 ADOBE FIREWORKS CS3 Extending Guide Example The following command copies the red data from the Clipboard into the red channel: fw.getDocumentDOM().clipPasteFromChannelToChannel("red", "red"); The following command copies the green data from the Clipboard into the alpha channel: fw.getDocumentDOM().clipPasteFromChannelToChannel("green", "alpha"); dom.clipPasteInside() Availability Fireworks 3, deprecated in 4 in favor of (see “dom.clipPasteAsMask()”...
  • Page 55 ADOBE FIREWORKS CS3 Extending Guide Description Makes exact duplicates of the selection, placing the duplicated items directly on top of the original items. Example The following command copies the selected items on top of the original items: fw.getDocumentDOM().cloneSelection(); See also dom.duplicateSelection()
  • Page 56 ADOBE FIREWORKS CS3 Extending Guide See also dom.convertToAnimSymbol(), dom.convertToSymbol() dom.convertMarqueeToPath() Availability Fireworks 7. Usage dom.convertMarqueeToPath() Arguments None. Returns Nothing. Description Converts marquee selection to path. dom.convertPathToMarquee() Availability Fireworks 7. Usage dom.convertPathToMarquee(mode, featherAmount) Arguments Sets the mode. Acceptable values are , and mode "hard edge"...
  • Page 57 ADOBE FIREWORKS CS3 Extending Guide Arguments A string that specifies a name for the new animation symbol. name An integer that specifies the number of frames through which the symbol animates. numFrames A point that specifies the distance the animation will move in pixels (see “Point data type” on offsetDistPt page 6).
  • Page 58 ADOBE FIREWORKS CS3 Extending Guide dom.convertToSymbol() Availability Fireworks 3. Usage dom.convertToSymbol(type, name) Arguments Acceptable values are , and type "graphic" "button" "animation" A name for the new symbol. name Returns Nothing. Description Converts the selected item(s) to a new symbol.
  • Page 59 ADOBE FIREWORKS CS3 Extending Guide Example The following example applies an edge-detection filter to the bitmap: // width of convolution kernel var w = 3; // height of convolution kernel var h = 3; // Edge detection kernel var k = new Array(0, 1, 0, 1, -4, 1, 0, 1, 0);...
  • Page 60 ADOBE FIREWORKS CS3 Extending Guide An optional string that specifies how to create Hotspots if multiple items are selected. whatIfMultipleSelected Acceptable values for (creates a single Hotspot that has the same whatIfMultipleSelected "single" bounding rectangle as the selection), (creates one Hotspot for each item), and (displays a "multiple"...
  • Page 61 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Deletes all the objects in the document. dom.deleteFrames() Availability Fireworks 3. Usage dom.deleteFrames(frameIndex, howMany) Arguments An integer value that specifies the location at which to begin deleting frames, starting with frameIndex (although, to specify the current frame, pass –1...
  • Page 62 ADOBE FIREWORKS CS3 Extending Guide dom.deletePageAt() Availability Fireworks CS3. Usage dom.deletePageAt(pageNum) Arguments A long value that indicates the page number of the page to be deleted. pageNum Returns Nothing. Description Deletes a specified page from the current document. For example: fw.getDocumentDOM().deletePageAt(0)
  • Page 63 ADOBE FIREWORKS CS3 Extending Guide Usage dom.deleteSavedSelection(bFillDeletedArea) Arguments This argument is ignored if Fireworks is not in bitmap mode. If Fireworks is in bitmap mode bFillDeletedArea , the deleted pixels are filled with the current fill color. If , the deleted pixels...
  • Page 64 ADOBE FIREWORKS CS3 Extending Guide Usage dom.deleteSymbol(symbolName) Arguments The name of the symbol to delete from the library. If more than one symbol exists with this name, symbolName only the first symbol is deleted. • To delete all the selected symbols from the library (not document), pass null •...
  • Page 65 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Splits the selected text-on-a-path items into its original text and path items. dom.detachSharedLayer() Availability Fireworks CS3. Usage dom.detachSharedLayer(layerNum, pageNum) Arguments A long value that specifies the layer number for the layer that is to be detached.
  • Page 66 ADOBE FIREWORKS CS3 Extending Guide dom.distributeLayerToFrames() Availability Fireworks 3. Usage dom.distributeLayerToFrames(layerIndex) Arguments An integer value that specifies the layer that contains the items to be distributed, starting with layerIndex (although, to specify the current layer, pass here). –1 Returns Nothing.
  • Page 67 ADOBE FIREWORKS CS3 Extending Guide Specifies whether the Shift key is pressed. shiftKeyDown Specifies whether the Control key (Windows) or Command key (Macintosh) is pressed. ctrlCmdKeyDown Specifies whether the Alt key (Windows) or Option key (Macintosh) is pressed. altOptKeyDown Returns Nothing.
  • Page 68 ADOBE FIREWORKS CS3 Extending Guide Arguments An integer value that specifies the layer to duplicate, starting with (although, to specify the current layerIndex layer, pass here). –1 An optional integer that specifies how many times to duplicate the layer. If omitted, the layer is dupli- howMany cated once.
  • Page 69 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Makes a duplicate of the selection, offsetting it slightly from the original. Example The following command duplicates the selected items: fw.getDocumentDOM().duplicateSelection(); See also dom.cloneSelection() dom.duplicateSelectionToFrameRange() Availability Fireworks 3. Usage dom.duplicateSelectionToFrameRange(frameIndexFirst, frameIndexLast) Arguments...
  • Page 70 ADOBE FIREWORKS CS3 Extending Guide Description Duplicates the selection to specified frames of the document. dom.duplicateSymbol() Availability Fireworks 3. Usage dom.duplicateSymbol(symbol) Arguments The symbol to duplicate. symbol • To duplicate all selected symbols in the library (not the document), pass a value.
  • Page 71 ADOBE FIREWORKS CS3 Extending Guide Usage dom.elementsAt(where) Arguments Specifies which rectangle to check for elements. To find the elements under a single point (similar to where selecting with the Subselection 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.
  • Page 72 ADOBE FIREWORKS CS3 Extending Guide Arguments A Boolean value that toggles 9-slice scaling between enabled and disabled. status Returns Nothing. Description Enables or disables 9-slice scaling for the selected symbol. Example The following command enables 9-slice scaling for the selected symbol: fw.getDocumentDOM().enableNineScale(true);...
  • Page 73 ADOBE FIREWORKS CS3 Extending Guide dom.enterPaintMode() Availability Fireworks 3, with the argument added in Fireworks MX. newSelectionMask Usage dom.enterPaintMode({newSelectionMask}) Arguments An optional bitmap selection mask. When is not , the selection is newSelectionMask newSelectionMask null set on the currently selected bitmap after entering paint mode. This argument is by default.
  • Page 74 ADOBE FIREWORKS CS3 Extending Guide Description Leaves bitmap mode. Has no effect if Fireworks is not in bitmap mode. dom.exportOptions.loadColorPalette() Availability Fireworks 3. Usage dom.exportOptions.loadColorPalette(fileURL) Arguments A string, which is expressed as a file://URL, that specifies the GIF or ACT file that is used to replace the fileURL color panel.
  • Page 75 ADOBE FIREWORKS CS3 Extending Guide Usage dom.exportTo(fileURL, {exportOptions}) Arguments A string, which is expressed as a file://URL, that specifies the name of the exported file. fileURL An ExportOptions object (see “ExportOptions object” on page 227). This argument is optional. exportOptions If this argument is omitted or , the document’s current Export Options settings are used.
  • Page 76 ADOBE FIREWORKS CS3 Extending Guide fw.getDocumentDOM().fillSelectedPixels({x:207, y:199}, {x:207, y:199}, {x:207, y:199}, {x:207, y:199}, false, 32, "hard edge", 0); dom.filterSelection() Availability Fireworks 3. usage dom.filterSelection(LiveEffect) Arguments An Effect object (see “Effect object” on page 214). LiveEffect Returns Nothing. Description Applies the specified pixel filter to the selection. Items that are not images are converted into images before the filter is applied.
  • Page 77 ADOBE FIREWORKS CS3 Extending Guide dom.filterSelectionByName() Availability Fireworks 3. Usage dom.filterSelectonByName(category, name) Arguments A string that specifies the category of the pixel filter to be applied. Acceptable values depend on which category filters you have installed. A string that specifies the name of the pixel filter to be applied. Acceptable values depend on which filters name you have installed.
  • Page 78 ADOBE FIREWORKS CS3 Extending Guide Usage dom.flattenDocument() Arguments None. Returns Nothing. Description Flattens the entire document into a single pixel image. This is the same behavior as the Merge Layers command. dom.flattenSelection() Availability Fireworks 3. Usage dom.flattenSelection() Arguments None. Returns Nothing.
  • Page 79 ADOBE FIREWORKS CS3 Extending Guide dom.getParentLayerNum() Availability Fireworks CS3. Usage dom.getParentLayerNum(currentLayer) Arguments A long value that specifies the index of the current layer. currentLayer Returns The layer index number of the parent layer. If the specified layer is a top-level layer, it returns a value of -1.
  • Page 80 ADOBE FIREWORKS CS3 Extending Guide Description Gets the bounding rectangle of the selection. dom.getShowGrid() Availability Fireworks 3. Usage dom.getShowGrid() Arguments None. Returns if the grid is visible; otherwise. true false Description Determines whether the grid is visible. dom.getShowGuides() Availability Fireworks 8.
  • Page 81 ADOBE FIREWORKS CS3 Extending Guide Returns if the rulers are visible; otherwise. true false Description Determines whether the rulers are visible. dom.getSnapToGuides() Availability Fireworks 8. Usage dom.getSnapToGuides() Arguments None. Returns if the Snap to Guides function is available; otherwise. true...
  • Page 82 ADOBE FIREWORKS CS3 Extending Guide Arguments None. Returns One of the following strings: "left" "center" "right" "justify" "stretch" "vertical left" "vertical , or . Returns if the text has center" "vertical right" "vertical justify" "vertical stretch" null multiple alignments or if the selection contains no text.
  • Page 83 ADOBE FIREWORKS CS3 Extending Guide Description Determines whether the selected text has the specified character markup. dom.hasMasterPage() Availability Fireworks CS3. Usage dom.hasMasterPage() Arguments None. Returns A Boolean value of if the current document has a master page, or if there is no master page.
  • Page 84 ADOBE FIREWORKS CS3 Extending Guide A rectangle that specifies the size to make the imported file (see “Rectangle data type” on boundingRectangle page 6). If is specified with , the file is brought in boundingRectangle left == right top == bottom unscaled with its top-left corner at the specified location, and the third argument is ignored.
  • Page 85 ADOBE FIREWORKS CS3 Extending Guide Usage dom.importSymbolButNotAsAlias(filepath, whichSymbol) Arguments of the file that contains the symbol to be copied. filepath fileURL The index of the symbol within the document, which is specified in the whichSymbol filepath Returns Nothing. Description xtracts the component elements from the selected symbol and places copies of those elements in the document.
  • Page 86 ADOBE FIREWORKS CS3 Extending Guide A zero-based index that specifies where the new point should be placed on the path. The new ptToInsertBefore point is appended in front of the point that this integer represents: To add a point to the beginning of the path, pass ;...
  • Page 87 ADOBE FIREWORKS CS3 Extending Guide Usage dom.insertSymbolAt(uiName, locationPoint) Arguments The name of the symbol in the library. If more than one symbol exists with the specified name, Fireworks uiName inserts the first symbol named. The center of the symbol expressed as x, y coordinates.
  • Page 88 ADOBE FIREWORKS CS3 Extending Guide dom.joinPaths() Availability Fireworks 3. Usage dom.joinPaths() Arguments None. Returns Nothing. Description Joins the selected paths. dom.knifeElementsFromPoint() Availability Fireworks 3. Usage dom.knifeElementsFromPoint(from, tolerance) Arguments A point that specifies the x,y coordinates of the point that the user clicked (see “Point data type” on page 6).
  • Page 89 ADOBE FIREWORKS CS3 Extending Guide Arguments A point that specifies the x,y coordinates of the point where the user clicked and started to drag (see “Point from data type” on page 6). A point that specifies the x,y coordinates of the point where the user ended the drag operation.
  • Page 90 ADOBE FIREWORKS CS3 Extending Guide Usage dom.lockNineScale(status) Arguments A Boolean value that toggles 9-slice scaling between locked and unlocked. status Returns Nothing. Description Locks or unlocks 9-slice scaling guides for the selected symbol. Example The following command locks 9-slice scaling guides for the selected symbol: fw.getDocumentDOM().lockNineScale(true);...
  • Page 91 ADOBE FIREWORKS CS3 Extending Guide dom.makeActive() Availability Fireworks 3. Usage dom.makeActive() Arguments None. Returns Nothing. Description Makes the selected document active for editing. dom.mergeDown() Availability Fireworks MX. Usage dom.MergeDown() Arguments None. Returns Nothing. Description Merges selected objects to the bitmap directly below the selected objects. Succeeds only if the object immediately below the selection is a bitmap.
  • Page 92 ADOBE FIREWORKS CS3 Extending Guide , and Points that specify the x,y coordinates of the controlPointFirst, mainPoint controlPointLast preceding control point, the main point, and the following control point of the new point (see “Point data type” on page 6).
  • Page 93 ADOBE FIREWORKS CS3 Extending Guide Arguments A zero-based index that specifies an index into the list of selected items, indicating which item whichPath contains the Bézier handles to move. A zero-based index that specifies the contour that contains the handles to move. For paths with contourIndex multiple contours, the contours are in an arbitrary order.
  • Page 94 ADOBE FIREWORKS CS3 Extending Guide Specifies which handle to move and can be one of the following values: whichHandle "start" "end1" "end2" , or . (Some fills ignore .) Use to rotate the "rotate1" "rotate2" "end2" "rotate1" "rotate2" end1 end2 point around the start point.
  • Page 95 ADOBE FIREWORKS CS3 Extending Guide Arguments A point that specifies the x,y coordinate values by which the bitmap mode selection is moved (see “Point delta data type” on page 6). For example, passing ({ })moves the bitmap mode selection 1 pixel to the right and 2 pixels down.
  • Page 96 ADOBE FIREWORKS CS3 Extending Guide Description If the selection is a Hotspot or slice of the polyline variety, this function moves a point on the Hotspot’s path by the specified amount. dom.moveSelectedBezierPointsBy() Availability Fireworks 3. Usage dom.moveSelectedBezierPointsBy(delta) Arguments A point that specifies the x,y coordinate values by which the selected Bézier points are moved (see “Point delta data type”...
  • Page 97 ADOBE FIREWORKS CS3 Extending Guide fw.getDocumentDOM().moveSelectionBy({x:62, y:84}, false, false); dom.moveSelectionMaskBy() Availability Fireworks 4. Usage dom.moveSelectionMaskBy(delta) Arguments A point that specifies the x-,y-coordinate values by which the mask is moved (see “Point data type” on delta page 6). For example, passing moves the mask 1 pixel to the right and 2 pixels down.
  • Page 98 ADOBE FIREWORKS CS3 Extending Guide dom.moveSelectionToFrame() Availability Fireworks 3. Usage dom.moveSelectionToFrame(frameIndex, bMakeCopy) Arguments An integer value that specifies the frame to which the selection is moved or copied, starting with 0 frameIndex (although, to specify the current frame, pass here).
  • Page 99 ADOBE FIREWORKS CS3 Extending Guide dom.moveSelectionToNewLayer() Availability Fireworks 3. Usage dom.moveSelectionToNewLayer(bMakeCopy) Arguments , the selected items are copied instead of moved. bMakeCopy bMakeCopy true Returns Nothing. Description Makes a new layer with a default name, then moves or copies the selection to that new layer.
  • Page 100 ADOBE FIREWORKS CS3 Extending Guide Description Performs a crop operation on the selected paths. dom.pathExpand() Availability Fireworks 3. Usage dom.pathExpand(width, miter, cap, join) Arguments A floating-point value that specifies the new width of the selected paths, in pixels. width A floating-point value that specifies the new miter angle of the selected paths, in pixels. This argument is...
  • Page 101 ADOBE FIREWORKS CS3 Extending Guide dom.pathIntersect() Availability Fireworks 3. Usage dom.pathIntersect() Arguments None. Returns Nothing. Description Performs an intersect operation on the selected paths. dom.pathPunch() Availability Fireworks 3. Usage dom.pathPunch() Arguments None. Returns Nothing. Description Performs a punch operation on the selected paths.
  • Page 102 ADOBE FIREWORKS CS3 Extending Guide Description Performs a simplify operation on the selected paths. dom.pathUnion() Availability Fireworks 3. Usage dom.pathUnion() Arguments None. Returns Nothing. Description Performs a union operation on the selected paths. dom.previewInBrowser() Availability Fireworks MX. Usage dom.previewInBrowser(primaryBrowser) Arguments...
  • Page 103 ADOBE FIREWORKS CS3 Extending Guide 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 from the Color Table panel. dom.redo() Availability Fireworks 3. Usage dom.redo()
  • Page 104 ADOBE FIREWORKS CS3 Extending Guide Arguments None. Returns Nothing. Description Forces the Auto Shapes in the document to redraw. This method is useful when modifying a Auto Shape outside a tool. dom.reflectSelection() Availability Fireworks 3. Usage dom.reflectSelection(bHoriz, bVert, opts) Arguments , the items are reflected horizontally.
  • Page 105 ADOBE FIREWORKS CS3 Extending Guide dom.removeBehavior() Availability Fireworks 3. Usage dom.removeBehavior({event}, {eventIndex}) Arguments An optional argument specifying the event that triggers the behavior. This argument is ignored by event Fireworks. An integer value that specifies the location of the behavior to be removed, starting with 0 (although, eventIndex to specify the end location, pass –1 here).
  • Page 106 ADOBE FIREWORKS CS3 Extending Guide Arguments Acceptable values are , and , for bold, italic, and underline. "b" "i" "u" Returns Nothing. Description Reapplies the default value for the specified markup type to the text in the selection. dom.removeElementMask() Availability Fireworks 4.
  • Page 107 ADOBE FIREWORKS CS3 Extending Guide dom.removeFill() Availability 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, guidekind) Arguments A floating-point value that specifies the position of the guide to be removed.
  • Page 108 ADOBE FIREWORKS CS3 Extending Guide Description Removes 9-slice scaling from the selected symbol. Example The following command removes 9-slice scaling from the selected symbol: fw.getDocumentDOM().removeNineScale(); dom.removeTransformation() Availability Fireworks 3. Usage dom.removeTransformation() Arguments None. Returns Nothing. Description Removes the transformations, if any, from the selected text or instances.
  • Page 109 ADOBE FIREWORKS CS3 Extending Guide dom.reorderLayer() Availability Fireworks 3, new arguments added in CS3. Usage dom.reorderLayer(layerToMove, layerToPutItBefore, bMakeCopy, posInLayer, aboveBelowInto) Arguments A zero-based index that specifies which layer to move or copy. layerToMove A zero-based index that specifies where to place the layer to be moved or copied. For...
  • Page 110 ADOBE FIREWORKS CS3 Extending Guide Usage dom.replaceButtonTextStrings(newString, uniformAttrs) Arguments Specifies the string to be used as replacement text. newString , each character retains the attributes of the character that was formerly uniformAttrs uniformAttrs false in its position; that is, Fireworks preserves the existing formatting. If...
  • Page 111 ADOBE FIREWORKS CS3 Extending Guide Usage dom.replaceTextString(newString, uniformAttrs) Arguments Specifies the string to be used as replacement text. newString , each character retains the attributes of the character that was formerly uniformAttrs uniformAttrs false in its position; that is, Fireworks preserves the existing formatting. If...
  • Page 112 ADOBE FIREWORKS CS3 Extending Guide Description Resizes the selection to the specified pixel width and height, keeping the top-left corner of the selection in place. dom.restoreJPEGMask() Availability Fireworks 4. Usage dom.restoreJPEGMask() Arguments None. Returns Nothing. Description Restores the selection that is specified in dom.saveJPEGMask().
  • Page 113 ADOBE FIREWORKS CS3 Extending Guide See also “dom.saveSelection()” on page 111 dom.reversePathTextDirection() Availability Fireworks 3. Usage dom.reversePathTextDirection() Arguments None. Returns Nothing. Description For all text-on-a-path items in the selection, it reverses the direction of the text along the path. dom.rotateDocument() Availability Fireworks 3.
  • Page 114 ADOBE FIREWORKS CS3 Extending Guide Acceptable values are , and " opts "transformAttributes" "autoTrimImages" autoTrimImages transfor- ". mAttributes Returns Nothing. Description Rotates the selection clockwise by the specified number of degrees. Rotating 270º is the same behavior as rotating 90º counterclockwise.
  • Page 115 ADOBE FIREWORKS CS3 Extending Guide dom.saveJPEGMask() Availability Fireworks 4. Usage dom.saveJPEGMask() Arguments None. Returns Nothing. Description Stores the current selection in bitmap mode as the “Selective JPEG mask”. Use to restore dom.restoreJPEGMask() the JPEG mask. See also dom.restoreJPEGMask() dom.saveSelection() Availability Fireworks 4.
  • Page 116 ADOBE FIREWORKS CS3 Extending Guide dom.scaleSelection() Availability Fireworks 3. Usage dom.scaleSelection(xScaleAmount, yScaleAmount, opts) Arguments Float values that specify the amount to scale the selection in the horizontal xScaleAmount yScaleAmount and vertical axes. Acceptable values are 0.0 or greater; a value of 1 represents 100%, 2 represents 200%, and so on.
  • Page 117 ADOBE FIREWORKS CS3 Extending Guide fw.getDocumentDOM().scalingGridRect(-50, -50, 50, 50); dom.selectAdjustPixelSel() Availability Fireworks 3. Usage dom.selectAdjustPixelSel(whatToDo, amount) Arguments Acceptable values are , and whatToDo "expand" "contract" "border" "smooth" • Use to expand the pixel selection outward by the number of pixels that are specified by "expand"...
  • Page 118 ADOBE FIREWORKS CS3 Extending Guide Usage dom.selectAllOnLayer(layerIndex, bRememberSelection, bToggleSelection) Arguments A long integer that identifies the layer on which to select the element. layerIndex A Boolean value. If , all the elements on the layer are appended to the current...
  • Page 119 ADOBE FIREWORKS CS3 Extending Guide 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 Fireworks 3. Usage dom.selectInverse() Arguments None. Returns Nothing.
  • Page 120 ADOBE FIREWORKS CS3 Extending Guide Arguments None. Returns Nothing. Description Selects the parents, if any, of the selection. That is, if all the members of a group are selected, the individual members are deselected, and the group is selected. See also dom.selectChildren()
  • Page 121 ADOBE FIREWORKS CS3 Extending Guide Arguments A point that specifies the x,y coordinates of the pixel whose color is used to calculate the new mask (see where “Point data type” on page 6). An integer between 0 and 255, inclusive, that specifies the tolerance for selecting pixels.
  • Page 122 ADOBE FIREWORKS CS3 Extending Guide Usage dom.setAllLayersDisclosure(bDisclosed) Arguments , all the elements on all layers appear in the Layers list. If , only layer bDisclosed bDisclosed true false names appear on the list. Returns Nothing. Description Specifies whether all the elements in all layers appear in the Layers list.
  • Page 123 ADOBE FIREWORKS CS3 Extending Guide Description Sets the number of frames to animate the currently selected animation element. See also dom.convertToAnimSymbol() dom.setAnimInstanceOffsetDist() Availability Fireworks 4. Usage dom.setAnimInstanceOffsetDist(offsetDistPt) Arguments A point that specifies the distance the animation moves in pixels. For example, passing offsetDistPt }) animates the symbol to the right by 100 pixels and 25 pixels down.
  • Page 124 ADOBE FIREWORKS CS3 Extending Guide See also dom.convertToAnimSymbol() dom.setAnimInstanceScaleAmount() Availability Fireworks 4. Usage dom.setAnimInstanceScaleAmount(scaleAmount) Arguments A positive floating-point value that specifies the amount of scaling to be applied to the animation scaleAmount symbol. For example, pass to scale the symbol to 50% of its current size, and pass to scale it to twice its current size.
  • Page 125 ADOBE FIREWORKS CS3 Extending Guide dom.setAnimInstanceStartFrame() Availability Fireworks 3, deprecated in 4 in favor of placing the animation symbol on the frame in which it should start. Usage dom.setAnimInstanceStartFrame(startFrame) Arguments An integer that corresponds to the starting frame value that appears in the Objects panel when a startFrame multi-frame image instance is selected.
  • Page 126 ADOBE FIREWORKS CS3 Extending Guide Description Sets the selection to the specified brush. See also dom.setBrushColor(), dom.setBrushName(), dom.setBrushNColorNTexture(), dom.setBrushPlacement() dom.setBrushColor() Availability Fireworks 3. Usage dom.setBrushColor(color) Arguments A color string (see “Color string data type” on page 5). color Returns Nothing.
  • Page 127 ADOBE FIREWORKS CS3 Extending Guide dom.setBrushNColor() Availability Fireworks 3. Usage dom.setBrushNColor(brush, brushColor) Arguments A Brush object (see “Brush object” on page 208). brush A color string (see “Color string data type” on page 5). brushColor Returns Nothing. Description Sets the selection to the specified brush and brush color.
  • Page 128 ADOBE FIREWORKS CS3 Extending Guide Arguments Acceptable values are , and placement "inside" "center" "outside" Returns Nothing. Description Specifies the brush placement of the stroke on the selection. dom.setButtonAutoSlice() Availability Fireworks 3. Usage dom.setButtonAutoSlice(bAutoSlice) Arguments , automatic slicing is turned on. If , it is turned off.
  • Page 129 ADOBE FIREWORKS CS3 Extending Guide Usage dom.setButtonIncludeDownState(bIncludeOverWhileDownState) Arguments , the Over-While-Down state is bIncludeOverWhileDownState bIncludeOverWhileDownState true included in the button. If , it is not. bIncludeOverWhileDownState false Returns Nothing. Description If the user edits a Button document, this function specifies whether to include the Over-While-Down state in a button.
  • Page 130 ADOBE FIREWORKS CS3 Extending Guide A string that specifies a status message to appear in the browser status line. If an empty string or statusMessage is passed, no status message appears. null 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.
  • Page 131 ADOBE FIREWORKS CS3 Extending Guide Usage dom.setDocumentCanvasColor(color) Arguments A color string (see “Color string data type” on page 5). color Returns Nothing. Description Sets the canvas color of the document to the specified color. Example The following command sets the canvas color to blue: fw.getDocumentDOM().setDocumentCanvasColor("#0000ff");...
  • Page 132 ADOBE FIREWORKS CS3 Extending Guide Arguments , the canvas can expand or shrink in size. If , it bGrowCanvas bGrowCanvas true bGrowCanvas false only shrinks. Returns Nothing. Description Calculates the size of all the items in the document and resizes the document canvas to that size. This action is the same behavior as Modify >...
  • Page 133 ADOBE FIREWORKS CS3 Extending Guide Arguments A rectangle that specifies the size to which the document should be scaled (see “Rectangle boundingRectangle data type” on page 6). Specifies the resolution for the scaled document (see “Resolution data type” on page 6).
  • Page 134 ADOBE FIREWORKS CS3 Extending Guide Description Sets the name for the current effect. dom.setElementLocked() Availability Fireworks 8. Usage dom.setElementLocked(frameNum, layerNum, objectIndex, bLock, bAllLayers, bLockLayers) Arguments A zero-based integer that specifies the frame that contains the element or elements to be locked. To frameNum specify the current frame, pass -1.
  • Page 135 ADOBE FIREWORKS CS3 Extending Guide Description Locks or unlocks all the elements with the specified name. If no element has the specified name an exception is thrown. If elements are hidden (for example, if they are on a hidden layer or frame), the function will not lock them.
  • Page 136 ADOBE FIREWORKS CS3 Extending Guide Arguments A string that specifies the name to be assigned to the selected element(s). To specify that no name should be name assigned or that an existing name should be removed, pass null Returns Nothing.
  • Page 137 ADOBE FIREWORKS CS3 Extending Guide dom.setElementVisibleByName() Availability Fireworks 4. Usage dom.setElementVisibleByName(name, bShow) Arguments A string that specifies the name of the element(s) to be shown or hidden. If more than one element has the name same name, this function shows or hides all of them.
  • Page 138 ADOBE FIREWORKS CS3 Extending Guide Arguments An ExportSettings object (see “ExportSettings object” on page 230). exportSettings Returns Nothing. Description Sets the document export settings. dom.setFill() Availability Fireworks 3. Usage dom.setFill(fill) Arguments A Fill object (see “Fill object” on page 233).
  • Page 139 ADOBE FIREWORKS CS3 Extending Guide Usage dom.setFillEdgeMode(edgemode, featherAmt) Arguments Acceptable values are , and edgemode "hard edge" "antialias" "feather" An integer that specifies the number of pixels to feather. This value is ignored if is not featherAmt edgemode "feather" Returns Nothing.
  • Page 140 ADOBE FIREWORKS CS3 Extending Guide Description Sets the selection to the specified fill, fill color, and fill texture. Example The following command sets the selected items to a linear fill with a feather edge and no texture: fw.getDocumentDOM().setFillNColorNTexture({ category:"fc_Linear", ditherColors:[ "#000000", "#000000"...
  • Page 141 ADOBE FIREWORKS CS3 Extending Guide dom.setFillVectorStart() Availability Fireworks 3. Usage dom.setFillVectorStart(p1) Arguments A point that specifies the x,y coordinates of the fill start point (see “Point data type” on page 6). Returns Nothing. Description Modifies the fill 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.
  • Page 142 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Sets the grid origin for the document. dom.setGridSize() Availability Fireworks 3. Usage dom.setGridSize(gridSize) Arguments A point that specifies the x,y coordinates that are used for the document’s grid size (see “Point data type”...
  • Page 143 ADOBE FIREWORKS CS3 Extending Guide Arguments An optional string that specifies how to group the items. Acceptable values are type "normal" "mask to , and . If the argument is omitted, is assumed. (The image" "mask to path" "normal" "mask to image"...
  • Page 144 ADOBE FIREWORKS CS3 Extending Guide Description Sets the alt tag text to the specified value for the Hotspots and slices in the selection. Example The following command sets the text attributes of the alt tag of the selected slices to "...
  • Page 145 ADOBE FIREWORKS CS3 Extending Guide dom.setHotspotShape() Availability Fireworks 3. Usage dom.setHotspotShape(whatToSet, shape) Arguments Acceptable values are , or whatToSet "hotspots" "slices" "hotspots and slices" Acceptable values are , or shape "rectangle" "oval" "polyline" Returns Nothing. Description Sets the specified Hotspots and slices in the selection to the specified shape.
  • Page 146 ADOBE FIREWORKS CS3 Extending Guide Description Sets the Hotspot text to the specified value for the Hotspots and slices in the selection. Arguments Acceptable values are , or whatToSet "hotspots" "slices" "hotspots and slices" A string that specifies the text to be used for the Hotspot or slice.
  • Page 147 ADOBE FIREWORKS CS3 Extending Guide See also dom.setAllLayersDisclosure() dom.setLayerLocked() Availability Fireworks 3. Usage dom.setLayerLocked(layerIndex, frameIndex, bLock, bAllLayers) Arguments An integer value that specifies the layer to be locked or unlocked, starting with (although, to specify layerIndex the current layer, pass here).
  • Page 148 ADOBE FIREWORKS CS3 Extending Guide Description Renames the specified layer. Layers aren’t required to have unique names, so no duplicate checking occurs. dom.setLayerSharing() Availability Fireworks 3. Usage dom.setLayerSharing(layerIndex, sharedStatus, bUnshareCopiesToAllFrames, bWarnUser) Arguments An integer value that specifies the layer to be shared or not shared, starting with...
  • Page 149 ADOBE FIREWORKS CS3 Extending Guide If the value of is set to , the layer is visible. If , it is hidden. bShow bShow true bShow false , all the layers on the specified frame are shown or hidden, and any value that...
  • Page 150 ADOBE FIREWORKS CS3 Extending Guide Example The following command sets the matte color to blue: fw.getDocumentDOM().setMatteColor(true, "#0033ff"); dom.setPixelMask() Availability Fireworks 3, deprecated in 4 in favor of dom.setSelectionMask() Usage dom.setPixelMask(mask, howToCombineMasks) Arguments A mask variable that specifies the mask to be applied (see “Mask data type” on page 5). If...
  • Page 151 ADOBE FIREWORKS CS3 Extending Guide Example The following command turns on onion skinning two frames before the selected frame and zero frames after it: fw.getDocumentDOM().setOnionSkinning(2, 0); dom.setOpacity() Availability Fireworks 3. Usage dom.setOpacity(opacity) Arguments A float variable between 0 and 100, inclusive.
  • Page 152 ADOBE FIREWORKS CS3 Extending Guide dom.setQuadrangle() Availability Fireworks 3. Usage dom.setQuadrangle(pTopLeft, pTopRight, pBottomRight, pBottomLeft, options) Arguments Relative coordinates of a quadrangle expressed as pTopLeft, pTopRight, pBottomRight, pBottomLeft percentages of an arbitrary square. These are not specific x, y coordinates. Acceptable values are...
  • Page 153 ADOBE FIREWORKS CS3 Extending Guide dom.setRectSides() Availability Fireworks 4. Usage dom.setRectSides(newSides) Arguments A rectangle that specifies the new untransformed sides of the rectangle primitive (see “Rectangle data newSides type” on page 6). Rectangle primitives remember their transformations, so the user sees the transformed result of in the document.
  • Page 154 ADOBE FIREWORKS CS3 Extending Guide Usage dom.setSelectionMask(mask, howToCombineMasks) Arguments Specifies the mask to be applied (see “Mask data type” on page 5). If , an existing pixel-selection mask mask null mask is removed. If there was previously a mask and...
  • Page 155 ADOBE FIREWORKS CS3 Extending Guide Description Specifies whether the Preview Gamma option is on or off. dom.setShowGrid() Availability Fireworks 3. Usage dom.setShowGrid(bShow) Arguments , the grid is visible. If , it is not visible. bShow bShow true bShow false Returns Nothing.
  • Page 156 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Specifies whether rulers are visible. dom.setShowSliceGuides() Availability Fireworks 3. Usage dom.setShowSliceGuides(bShow) Arguments , the slice guides are visible. If , they are not visible. bShow bShow true bShow false Returns Nothing. Description Specifies whether slice guides are visible.
  • Page 157 ADOBE FIREWORKS CS3 Extending Guide Arguments , automatic naming is turned on for the slice. If , it bAutoname bAutoname true bAutoname false is turned off. Returns Nothing. Description If a single slice is selected, this function turns automatic naming on or off for the slice.
  • Page 158 ADOBE FIREWORKS CS3 Extending Guide Usage dom.setSliceGuideColor(color) Arguments A color string (see “Color string data type” on page 5). color Returns Nothing. Description Sets the color that is used to display slice guides. To set the color of normal guides, use dom.setGuideColor()
  • Page 159 ADOBE FIREWORKS CS3 Extending Guide dom.setSnapToGrid() Availability Fireworks 3. Usage dom.setSnapToGrid(bSnap) Arguments , the tools snap to the grid. If , they do not. bSnap bSnap true bSnap false Returns Nothing. Description Specifies whether tools snap to the grid. dom.setSnapToGuides() Availability Fireworks 3.
  • Page 160 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Sets the name and symbol type of the specified symbol. dom.setTextAlignment() Availability Fireworks 3. Usage dom.setTextAlignment(alignment) Arguments Acceptable values alignment alignment "left" "center" "right" "justify" "stretch" "vertical , and left" "vertical center"...
  • Page 161 ADOBE FIREWORKS CS3 Extending Guide dom.setTextAutoKern() Availability Fireworks 3. Usage dom.setTextAutoKern(bKern) Arguments , automatic kerning is on for the selected text items. If , it is off. bKern bKern true bKern false Returns Nothing. Description Specifies whether automatic kerning is on or off for the selected text items.
  • Page 162 ADOBE FIREWORKS CS3 Extending Guide Description Sets the oversampling used to anti-alias text in custom mode. dom.setTextCustomAntiAliasSharpness() Availability Fireworks MX 2004. Usage dom.setTextCustomAntiAliasSharpness(sharpness) Arguments An integer from 0 to 255. sharpness Returns Nothing. Description Sets the sharpness value used to anti-alias text in custom mode.
  • Page 163 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Sets the horizontal flow direction of the selected text items. dom.setTextHorizontalScale() Availability Fireworks MX. Usage dom.setTextHorizontalScale(horizScale) Arguments A floating-point number that describes how much to scale the text characters horizontally. A value horizScale is normal.
  • Page 164 ADOBE FIREWORKS CS3 Extending Guide dom.setTextOnPathMode() Availability Fireworks 3. Usage dom.setTextOnPathMode(mode) Arguments Acceptable values are , and mode "rotate" "vertical" "skew vertical" "skew horizontal" Returns Nothing. Description Determines how the selected text-on-a-path items are displayed. dom.setTextOnPathOffset() Availability Fireworks 3. Usage dom.setTextOnPathOffset(offset)
  • Page 165 ADOBE FIREWORKS CS3 Extending Guide Description Sets the horizontal/vertical text orientation of the selected text items. dom.setTextParaIndent() Availability Fireworks MX. Usage dom.setTextParaIndent(paraIndent) Arguments The number of pixels by which to indent the first line of a paragraph. paraIndent Returns Nothing.
  • Page 166 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Sets the before-paragraph spacing for text; that is, the number of pixels to move down from the previous paragraph before starting the new paragraph. For vertical text mode, this function defines the vertical distance between paragraphs.
  • Page 167 ADOBE FIREWORKS CS3 Extending Guide Usage dom.setTextRectangle(boundingRectangle) Arguments A rectangle that specifies the new size within which the text item should flow (see boundingRectangle “Rectangle data type” on page 6). Returns Nothing. Description Changes the bounding rectangle of the selected text item to the specified size. This function causes the text to reflow inside the new rectangle;...
  • Page 168 ADOBE FIREWORKS CS3 Extending Guide • Left-justified horizontal text is placed with its top and left edges at , and the text expands to the anchorPoint right. • Centered horizontal text is centered horizontally around and expands equally to the left and right.
  • Page 169 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Shares or removes a specified foreground layer for specified pages. dom.shareWebLayerToPages() Availability Fireworks CS3. Usage dom.shareWebLayerToPages(layerNum, addToPages, deleteFromPages) Arguments A long value that indicates the layer number for the web layer that is to be shared across pages.
  • Page 170 ADOBE FIREWORKS CS3 Extending Guide dom.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() Availability Fireworks 3. Usage dom.swapBrushAndFillColors() Arguments None. Returns Nothing. Description Swaps the current brush color and current fill color. This function has no effect on any selected items.
  • Page 171 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Transforms the selection using the specified three-by-three matrix. dom.tween() Availability Fireworks 3. Usage dom.tween() Arguments An integer that specifies how many new instances are generated. numSteps , the new instances are distributed to frames.
  • Page 172 ADOBE FIREWORKS CS3 Extending Guide Usage dom.updateSymbol(name) Arguments The name of a symbol in the library. If more than one symbol exists with a name of , then only the first name name symbol with that name is updated. If...
  • Page 173 ADOBE FIREWORKS CS3 Extending Guide Description Resets the document’s master page. Makes the current master page into a normal page. For example: fw.getDocumentDOM().unsetMasterPage()
  • Page 174: Chapter 4: The Fireworks Object

    Chapter 4: The Fireworks Object The Fireworks object is a global object, which you can use to set or retrieve properties that relate to the current operating environment. (The App object that was used in Fireworks 3 is supported for backward compatibility, but its use is deprecated in favor of the Fireworks object.) The following table lists the properties of the Fireworks object, along with their data types and, where appropriate, acceptable values and notes.
  • Page 175 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes • string The name of the application ( appName "Fireworks CS3" This attribute is part of the common API, so it also appears as (as implemented in app.appName Adobe Dreamweaver). •...
  • Page 176 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes object Provides access to an instance of the Dialogs class, dialogs • which opens specific dialog boxes. Boolean If set to , Fireworks will automatically close the dismissBatchDialogWhen- true Batch Process dialog box when the script finishes.
  • Page 177 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes integer The second number (y) that appears in the Batch progressCountTotal Progress dialog box, in the “File x of y” field. Set this property to change the number. screenRect • rectangle The size of the main screen on this computer, in pixels.
  • Page 178: Fireworks Functions

    . The first two values display an Open dialog browseType "open" "select" "save" box; each is acceptable for compatibility with Adobe Dreamweaver. The third value displays a Save dialog box. Ignored by Fireworks but are accepted for compatibility with Dreamweaver. title previewArea Returns The file URL selected by the user, or if the dialog box was canceled.
  • Page 179 ADOBE FIREWORKS CS3 Extending Guide Usage fw.browseForFolderURL({title}, {startFolder}) Arguments An optional string that specifies a title for the dialog box that appears. If it is omitted or , a default title title null appears. An optional string that serves as the root directory for the dialog box that appears. If it is omitted startFolder , the browse dialog box displays an unspecified directory, depending on your system configuration.
  • Page 180 ADOBE FIREWORKS CS3 Extending Guide fw.chooseBrowser() Availability Fireworks MX. Usage fw.chooseBrowser(primaryBrowser) Arguments A Boolean value that indicates which browser to select. If , Fireworks primaryBrowser primaryBrowser true prompts the user to set the primary browser; if the argument is , Fireworks prompts the user to set the false secondary browser.
  • Page 181 ADOBE FIREWORKS CS3 Extending Guide Arguments A Document object that specifies the document to close (see “The Document object” on page 20). document An optional Boolean argument. If or omitted and the bPromptToSaveChanges bPromptToSaveChanges true document has changed since the last time it was saved, the user is prompted to save changes to the document. If , the user is not prompted, and any changes to the document are discarded.
  • Page 182 ADOBE FIREWORKS CS3 Extending Guide Description Shows the New Document dialog box and allows the user to create a new document. fw.createFireworksDocument() Availability Fireworks 3. Usage fw.createFireworksDocument(size, res, backgroundColor) Arguments A point whose x value specifies the document’s width and whose y value specifies the document’s height.
  • Page 183 ADOBE FIREWORKS CS3 Extending Guide fw.dialogs.runEditGuides() Availability Fireworks 3. Usage fw.dialogs.runEditGuides() Arguments None. Returns Opens the Edit Guides dialog box. fw.dialogs.runNumericTransform() Availability Fireworks 3. Usage fw.dialogs.runNumericTransform() Arguments None. Returns Opens the Numeric Transform dialog box. fw.disableFlashDebugging() Availability Fireworks MX Usage fw.disableFlashDebugging()
  • Page 184 ADOBE FIREWORKS CS3 Extending Guide fw.dismissBatchDialogWhenDone() Availability Fireworks 4. Usage fw.dismissBatchDialogWhenDone(autoClose) Arguments A Boolean value. If set to , the Batch Progress dialog box closes automatically (without user inter- autoClose true vention) when the script finishes. Returns Nothing. Description Closes the Batch Progress dialog box automatically when the script finishes. This function has no effect if the Batch Progress dialog box does not appear.
  • Page 185 Returns A Boolean value: if successful; otherwise. true false Description Exports the specified document to the specified file as layers to be imported into Adobe Director. fw.exportDirectorAsSlices() Availability Fireworks MX. Usage fw.exportDirectorAsSlices(document, fileURL) Arguments A Document object, for example, , that specifies the document to export.
  • Page 186 ADOBE FIREWORKS CS3 Extending Guide Description Exports the specified document to the specified file as Adobe Director images. fw.exportDocumentAs() Availability Fireworks 3. Usage fw.exportDocumentAs(document, fileURL, exportOptions) Arguments A Document object, for example, , that specifies the document to be exported. If document fw.documents[2]...
  • Page 187 ADOBE FIREWORKS CS3 Extending Guide Description Exports a document’s frames as individual images. The image names are based on the names in the Frames panel. Example The following command exports the frames in the current document to the C:\images directory: fw.exportFrames(null, "file:///C|/images");...
  • Page 188 Returns A Boolean value: if successful; otherwise. true false Description Exports the specified document to the specified file in Adobe Illustrator format. fw.exportLayers() Availability Fireworks 4. Usage fw.exportLayers(docObject, directoryURL) Arguments A Document object that specifies the document that contains the layers to export (see “The Document docObject object”...
  • Page 189 ADOBE FIREWORKS CS3 Extending Guide Arguments A Document object that specifies the document to export (see “The Document object” on page 20). docObject To export the current document, pass null The name of the Photoshop document to be created, which is expressed as a file://URL.
  • Page 190 Exports a Fireworks document as a Adobe Flash document. Example The Adobe Flash writer is controlled by the values of several preferences. See the following example for allowed values. A well-behaved script should restore the original values after exporting the file.
  • Page 191 ADOBE FIREWORKS CS3 Extending Guide fw.setPref("SwfFrameRate", 5);// frame rate fw.exportSWF(null, "file:///C|/new folder/test.swf"); // Put the prefs back. fw.setPref("SwfMaintainObjEditable", prevMaintainObjEditable); fw.setPref("SwfMaintainTextEditable", prevMaintainTextEditable); fw.setPref("SwfExportAllFrames", prevExportAllFrames); fw.setPref("SwfExportFromFrame", prevExportFromFrame); fw.setPref("SwfExportToFrame", prevExportToFrame); fw.setPref("SwfJpegQuality", prevJpegQualit); fw.setPref("SwfFrameRate", prevFrameRate); fw.findApp() Availability Fireworks MX. Usage fw.findApp(macAppSignature or winExeRegistryName) Arguments...
  • Page 192 ADOBE FIREWORKS CS3 Extending Guide Arguments None. Returns The number of items that are replaced if the search is completed, or if there are items in the document that –1 remain to be searched. Description Finds the next instance of the current search string and selects that section of the document. To begin a search, use fw.setUpFindReplace()
  • Page 193 ADOBE FIREWORKS CS3 Extending Guide fw.getDocumentPath() Availability Fireworks 3. Usage fw.getDocumentPath(document) Arguments A Document object, for example, that specifies the document whose path and document fw.documents[2], filename should be retrieved. If , information about the active document is retrieved. document...
  • Page 194 ADOBE FIREWORKS CS3 Extending Guide Arguments Acceptable values are panelName "find" "project log" "object" "info" "url" "effect" "history" "mixer" "fill" "stroke" "swatches" "layers" "frames" "behaviors" "optimize" "library" , and "styles" "optimized colors" "options" "toolbox" Note: Any panels not specified in the list of valid arguments (like those in the Command Panels folder which are “outside”...
  • Page 195 ADOBE FIREWORKS CS3 Extending Guide Returns A Boolean value: if the panels are hidden; otherwise. true false Description Returns the hidden or visible status of the panels. fw.getHTMLFileForScript() Availability Fireworks MX. Usage fw.getHTMLFileForScript() Arguments None. Returns A file URL. Description Returns an HTML file.
  • Page 196 ADOBE FIREWORKS CS3 Extending Guide Arguments A string that specifies the Preference value to return. A complete list of these values is beyond the scope prefkey of this documentation, but the format of exactly matches that in the Fireworks Preferences file. To set a...
  • Page 197 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Example The following command starts a browser that opens to the Adobe website: fw.launchBrowserTo("http://www.Adobe.com"); Description Starts Fireworks’ primary web browser to open a URL. fw.locateDocDialog() Availability Fireworks 4. Usage fw.locateDocDialog(maxnumdocs, formatlist) Arguments Specifies the maximum number of documents to choose.
  • Page 198 ADOBE FIREWORKS CS3 Extending Guide Description Displays a dialog box that lets the user select one or more files. fw.openDocument() Availability Fireworks 3, updated in Fireworks 4 and Fireworks 8. Usage fw.openDocument({fileURL}, {bOpenAsNew}, bOpenWithWindowHidden) Arguments A string or an array of strings, each expressed as a file://URL, that specifies the files to be opened. This fileURl argument is optional.
  • Page 199 ADOBE FIREWORKS CS3 Extending Guide A Boolean value that lets the user select a transparent color; set to for transparent, allowTransparent true otherwise. false A Boolean value that forces the specified color to fall within the web216 panel; set to...
  • Page 200 ADOBE FIREWORKS CS3 Extending Guide Description Quits Fireworks, but prompts the user to save any changed documents before exiting. Identical to “fw.quitAppli- cation()” on page 196. fw.quitApplication() Availability Fireworks 3. Usage fw.quitApplication() Arguments None. Returns Nothing. Description Quits Fireworks, but prompts the user to save any changed documents before exiting.
  • Page 201 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Reads in a panel state file, which is generated by “fw.writePanelStateToFile()” on page 206, and moves the panels, Property inspector, and toolbox to the appropriate locations. fw.replace() Availability Fireworks 3. Usage fw.replace() Arguments None.
  • Page 202 ADOBE FIREWORKS CS3 Extending Guide fw.revertDocument() Availability Fireworks 3. Usage fw.revertDocument({document}) Arguments A Document object, for example, , that specifies the document to be reverted. This document fw.documents[2] argument is optional. If is omitted or , the active document is reverted.
  • Page 203 ADOBE FIREWORKS CS3 Extending Guide Arguments None. Returns Nothing. Description Saves all open documents, displaying the Save As dialog box for any documents that were not previously saved. fw.saveDocument() Availability Fireworks 3. Usage fw.saveDocument(document, {fileURL}) Arguments A Document object, for example, , that specifies the document to be saved.
  • Page 204 ADOBE FIREWORKS CS3 Extending Guide Description Displays the Save As dialog box for the specified document, so that it can be saved as a native Fireworks PNG file with the specified name. To save a document to another format, such as GIF or JPEG, use fw.exportDocu-...
  • Page 205 ADOBE FIREWORKS CS3 Extending Guide Description Saves the specified string of JavaScript code as a JSF command file. fw.setActiveViewScale() Availability Fireworks MX. Usage fw.setActiveViewScale(scale, center) Arguments A floating-point number where 1.0 is 100%, or normal view, and 1.5 is 150%. Default is 6%.
  • Page 206 ADOBE FIREWORKS CS3 Extending Guide fw.setFloaterGrouping() Availability Fireworks 3. Usage fw.setFloaterGrouping(panelNameToMove, panelNameToReceive) Arguments A lowercase string that specifies the panel to be moved. panelNameToMove A lowercase string that specifies the panel into which the panel should panelNameToReceive panelNameToMove move. If , the panel moves into its own panel.
  • Page 207 ADOBE FIREWORKS CS3 Extending Guide A rectangle that specifies the size of the panel (see “Rectangle data type” on page 6). Some boundingRectangle panels ignore the specified size but place the upper-left corner of the panel at the upper-left of the specified rectangle.
  • Page 208 ADOBE FIREWORKS CS3 Extending Guide Description Shows or hides the panels. This behavior is the same as the Tab key behavior. fw.setPref() Availability Fireworks 3. Usage fw.setPref(prefname, prefval) Arguments A complete list of these values is beyond the scope of this documentation, but the format...
  • Page 209 ADOBE FIREWORKS CS3 Extending Guide Usage fw.toggleFloater(panelName) Arguments Acceptable values are panelName "find" "project log" "object" "info" "url" "effect" "history" "mixer" "fill" "stroke" "swatches" "layers" "frames" "behaviors" "optimize" "library" , and "styles" "optimized colors" "options" "toolbox" Note: Any panels not specified in the list of valid arguments (like those in the Command Panels folder which are “outside”...
  • Page 210 ADOBE FIREWORKS CS3 Extending Guide Usage fw.updateHTML(doc, htmlUrl, bRecoverFromError) Arguments A Document object that specifies the document to be used for updating the HTML (see “The Document object” on page 20). If , the active document is used. null The filename of the HTML file to update, which is expressed as a file://URL. To force Fireworks to...
  • Page 211 ADOBE FIREWORKS CS3 Extending Guide Arguments The prompt message that appears in the dialog box. promptString Returns A Boolean value: if the user selected the Yes button; otherwise. true false Description Displays a dialog box that contains buttons labeled Yes and No.
  • Page 212: Chapter 5: Objects Within Fireworks Documents

    Chapter 5: Objects within Fireworks documents This chapter describes the objects that can get or set the properties of elements in a Fireworks document. For syntax on accessing Fireworks documents and elements within them, see “Accessing a Fireworks document” on page 4 and “Passing values”...
  • Page 213 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes integer The lengths in pixels of spaces for a dotted line, these dashOffSize1, values control the first, second, and third spaces, dashOffSize2, dashOffSize3 respectively. integer The lengths, in pixels, of dashes for a dotted line,...
  • Page 214 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes float sense_random_opacity float sense_random_saturation float sense_random_scatter float sense_random_size float sense_speed_angle float sense_speed_blackness float sense_speed_hue float sense_speed_lightness float sense_speed_opacity float sense_speed_saturation float sense_speed_scatter float sense_speed_size float sense_vdir_angle float sense_vdir_blackness float sense_vdir_hue float...
  • Page 215: Contour Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes float 0 to 100 tipSpacing string Acceptable values are "random" "diagonal" tipSpacingMode "circular" string Acceptable values are "natural" type "simple" Contour object The following table lists the properties of the Contour object, along with their data types and, where appropriate, acceptable values and notes.
  • Page 216: Contournodedynamicinfo Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes The y coordinate of the contour node’s following float succY control point. The x coordinate of the contour node’s main control float point. The y coordinate of the contour node’s main control float point.
  • Page 217: Controlpoint Object

    ADOBE FIREWORKS CS3 Extending Guide ControlPoint object The following table lists the properties of the ControlPoint object, along with their data types and, where appro- priate, acceptable values and notes. Property Data type Notes Boolean true , Fireworks highlights an object when a hiliteDragOverObject control point is dragged over it.
  • Page 218: Effect Object

    ADOBE FIREWORKS CS3 Extending Guide Method Parameter Definition point The center point for the polygon. RegisterPolygonMove() object The RegisterMoveParms object containing the move parameters. Use smartShape.GetDefault- MoveParms() to obtain this object, then adjust properties as needed. For a list of properties, see “RegisterMoveParms object”...
  • Page 219 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes integer Controls the opacity at which the edge of the effect is EdgeThreshold defined. Use BevelType = 4 (for GlowEffect); otherwise, use Boolean If set to false , the effect is included but temporarily EffectIsVisible hidden.
  • Page 220 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes Boolean The default value is ShowObject false float A multiplier that is used to calculate the magnitude of SlopeMultiplier the bevel slope. Default effects all use 1, but other values should work. For example, 0.5 gives a more subtle slope and 2.0 gives a sharper slope.
  • Page 221 ADOBE FIREWORKS CS3 Extending Guide Convert to Alpha object Property Data type Notes Boolean If set to , the effect is included but temporarily false EffectIsVisible hidden. The default value is true string EffectMoaID "{2932d5a2-ca48-11d1- 8561000502701850}" Curves object Property Data type...
  • Page 222 ADOBE FIREWORKS CS3 Extending Guide Find Edges object Property Data type Notes Boolean If set to , the effect is included but temporarily false EffectIsVisible hidden. The default value is true string EffectMoaID "{fc7093f1-f95c-11d0- 8be200a024cdc039}" Gaussian Blur object Property Data type...
  • Page 223 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes string A color string that specifies the color of the shadow ShadowColor (for more information, see “Color string data type” on page 5). integer The offset of the shadow, in pixels.
  • Page 224 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes integer These dest* values are all output levels to the filter, dest_low_rgb with values of 0 to 255. dest_high_rgb dest_low_red dest_high_red dest_low_green dest_high_green dest_low_blue dest_high_blue float These gamma* values are all gamma levels to the gamma_rgb filter, with values of 0.1 to 10.0.<...
  • Page 225: Effectlist Object

    ADOBE FIREWORKS CS3 Extending Guide EffectList object The following table lists the properties of the EffectList object, along with their data types and, where appropriate, acceptable values and notes. Property Data type Notes string Specifies which subheading in the Effects panel to category use.
  • Page 226 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes rect Rectangle of the area occupied by the pixels. For pixelRect example, the pixelRect of a text object is smaller than what the property inspector reports, since the actual pixels are inside the bounding box.
  • Page 227 ADOBE FIREWORKS CS3 Extending Guide Method Parameter Definition string Generates JavaScript code for creating an Auto generateSmartShapeCode() Shape. You can specify a string to prefix each line of output. point Changes an object to the new coordinates after an globalToSmartShapeCoords()
  • Page 228 ADOBE FIREWORKS CS3 Extending Guide Hotspot object A Hotspot converts to an image map during HTML export. Hotspot is a subclass of the base class Element and contains the following properties in addition to those in Element (for more information, see “Element object” on page 221).
  • Page 229 ADOBE FIREWORKS CS3 Extending Guide Path object Path is a subclass of the base class Element and contains the following properties in addition to those in Element (for more information, see “Element object” on page 221). Property Data type Notes...
  • Page 230: Elementmask Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes float Leftmost space occupied by the pixels (not the left rawLeft location of the bounding box). float Width of the area occupied by the pixels (not the area rawWidth of the bounding box).
  • Page 231: Exportframeinfo Object

    ADOBE FIREWORKS CS3 Extending Guide ExportFrameInfo object The following table lists the properties of the ExportFrameInfo object, along with their data type and, where appro- priate, acceptable values and notes. Property Data type Notes integer For GIF animations, the delay time between frames, in delayTime 1/100ths of a second.
  • Page 232 ADOBE FIREWORKS CS3 Extending Guide – – use scaling xSize > 0, ySize = 0 xSize – – do not use; instead, use xSize > 0, ySize > 0 useScale = true percentScale = 0 to 100 The following table lists the properties of the ExportOptions object, along with their data types and, where appro- priate, acceptable values and notes.
  • Page 233: Exportpaletteinfo Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes array Array of color strings (for more information, see “Color paletteEntries string data type” on page 5); default value is null. array Array of ExportPaletteInfo objects, or null if all paletteInfo entries in the array are default values (for more infor- mation, see “ExportPaletteInfo object”...
  • Page 234: Exportsettings Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes Boolean Set to if the color is selected in the panel (selec- colorSelected true tion is a temporary attribute). The default value is false Boolean Set to true if the color is exported as transparent.
  • Page 235 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes Boolean If set to , generates multiple HTML pages for generateDemoHtml true button export. string Acceptable values are htmlDestination "same" "custom" "clipboard". Boolean If set to , the user specifies the export settings.
  • Page 236 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes through string Used to generate a name by concatenating six sliceAutoNaming1 sliceAutoNaming6 strings. If you need fewer than six strings, fill in the remaining strings with "none" Acceptable values are: "none"...
  • Page 237: Fill Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes string Used to generate a name by concatenating two sliceFrameNaming1 sliceFrameNaming2 strings; the resulting string is concatenated to the name specified by . If you sliceAutoNaming need fewer than two strings, fill in the remaining string with "none"...
  • Page 238: Frame Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes string Acceptable values are shape "solid" "linear" "radial" "conical" "satin" "pinch" "folds" "elliptical" "rectangular" "bars" "ripple" "waves" "pattern" "web dither" string Acceptable values are stampingMode "blend" "blend opaque" float 0 to 100...
  • Page 239: Gradient Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes array Array of elements and sublayers obtained from elemsandsublayers topLayers. Boolean If set to , this FrameNLayerIntersection is locked true locked. Default value is false Boolean If set to , this FrameNLayerIntersection is...
  • Page 240: Layer Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes string A color string that specifies the color used for the color guides (see “Color string data type” on page 5). array Array of floating-point numbers that specify hori- hGuides zontal guide locations.
  • Page 241: Pattern Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes object Texture object (see “Texture object” on page 226). brushTexture object Fill object (see “Fill object” on page 233). fill string A color string that specifies the color that is used for fillColor rendering the Fill object, if any (see “Color string data...
  • Page 242: Registermoveparms Object

    ADOBE FIREWORKS CS3 Extending Guide RegisterMoveParms object The following table lists the properties of the RegisterMoveParms object, along with their data types and, where appropriate, acceptable values and notes. Property Data type Notes Boolean Determines whether dragging the control point...
  • Page 243 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes string The key value that you want to use to constrain move- constrain90Key ment to the nearest 90º increment. Can be one of the following: "none" "shiftKey" "ctrlCm- dKey" "altOptKey" A key value of means dragging will not be "none"...
  • Page 244 ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes string Pass in the key that you want to use to disable disableRotateKey rotating around the center. The value can be one of the following: "none" "shiftKey" "ctrlCm- . A value of means dKey"...
  • Page 245: Singletextrun Object

    ADOBE FIREWORKS CS3 Extending Guide SingleTextRun object The following table lists the properties of the SingleTextRun object, along with their data types and, where appro- priate, acceptable values and notes. Property Data type Notes object TextAttrs object (see “TextAttrs object” on page 243).
  • Page 246: Style Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes point Location of the mouse during a mouse click. mouseDownPos • string Message received from Fireworks, see “Fireworks operation • messages” on page 278 for possible messages. point Location of the mouse at the previous prevMousePos •...
  • Page 247: Textattrs Object

    ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes Boolean If set to , applies the property of use_brushColor true brushColor the pathAttrs object when applying the style. If set to , ignores the property. The false brushColor default value is...
  • Page 248: Textruns Object

    ADOBE FIREWORKS CS3 Extending Guide Property Data type Notes float The relative width of the characters. horizontalScale 1.0 — normal width < 1 — thinner than normal > 1 — wider than normal Boolean Set to true for italic text, false for normal text.
  • Page 249: Widget Object

    ADOBE FIREWORKS CS3 Extending Guide Widget object The following table lists the properties of the Widget object, along with their data types and, where appropriate, acceptable values and notes. Property Data type Notes Boolean Set the visibility of an element to true or false.
  • Page 250 ADOBE FIREWORKS CS3 Extending Guide The following table lists a method of the Widget object, along with its parameters. Method Parameter Definition elemName value specifies the element name for GetObjectByName() elemName the object as it is specified in the Layers panel. This method returns the JavaScript type for the specified element name.
  • Page 251: Chapter 6: Html Export Objects

    Chapter 6: HTML export objects Fireworks provides several object types that support the output of HTML and sliced images from Fireworks. These objects let you write JavaScript scripts that create templates to output the type of HTML that suits your specific requirement (generic HTML, Dreamweaver-compatible HTML, and so on).
  • Page 252 ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes date Specifies the date the document was created. creationDate string is set to 6 (Button Highlight), specifies the action dhHref URL of the highlight image used for the Down button state.
  • Page 253 ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes string is set to 9 (Popup Menu), specifies the menuImagePath action path to the first image. string action is set to 9 (Popup Menu), specifies the menuImagePath2 path to the second image.
  • Page 254: Behaviorslist Object

    ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes string is set to 9 (Popup Menu), specifies the textOverColor action menu text color for the over state. integer action is set to 9 (Popup Menu), specifies the textSize point size for the menu text.
  • Page 255 ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes The background URL, which is expressed as file://URL. string backgroundLink Boolean If this value is , Fireworks will output combined true cssPopupMenus CSS/JavaScript pop-up menus; if , Fireworks false outputs JavaScript-only pop-up menus.
  • Page 256: Imagemap Object

    ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes string Name of the image that is being exported, without imagename the extension; for example, "Button" Boolean The value of the Include HTML Comments preference, includeHTMLComments which the export script interprets as appropriate. For...
  • Page 257: Imagemaplist Object

    ADOBE FIREWORKS CS3 Extending Guide Property (read-only) or Method Data type Notes Boolean Set to if the target text is not empty. hasTargetText true string The URL link for this slice, which is expressed as href file://URL. integer Number of coordinates in the area. A circle always...
  • Page 258 ADOBE FIREWORKS CS3 Extending Guide Property (read-only) or method Data type Notes string The alternate text description for this slice. altText object BehaviorsList object that contains the behaviors for behaviors this slice (see “BehaviorsList object” on page 250). integer Height of this table row, in pixels.
  • Page 259: Slices Object

    ADOBE FIREWORKS CS3 Extending Guide Property (read-only) or method Data type Notes zero-based index Sets the filename for the slice on the specified frame, setFrameFileName without directory or extension information. You can (frameIndex) stop an image from being exported by setting its name to ""...
  • Page 260 ADOBE FIREWORKS CS3 Extending Guide Property (read-only) Data type Notes zero-based index Index for each file generated for multiple file button demoIndex export. Boolean Corresponds to the Export Multiple Nav bar HTML doDemoHTML Files check box in the Document Specific tab of the HTML Setup dialog box.
  • Page 261: Chapter 7: Cross-Product Extensions

    Fireworks functionality. They may use JavaScript APIs for adding image-editing functionality to those applications as well as custom Fireworks panels developed in Adobe Flash to enhance the functionality of Fireworks. For example, a developer may want to create an ActionScript command so that a user can replace text in an image without leaving the current movie.
  • Page 262 ADOBE FIREWORKS CS3 Extending Guide Fireworks RPC transactions pass XML between an RPC client and the Fireworks RPC server built in to Fireworks. The RPC client is any supported program that connects to Fireworks through a TCP stream on port 12124. The Fireworks RPC server is the internal code that listens on TCP port 12124 and then handles client requests.
  • Page 263 ADOBE FIREWORKS CS3 Extending Guide • The operation retrieves the current object properties. The operation can contain only the name attributes and no subelements. In the following example, the client requests the value of the property of appDir the object whose ID is 1: <get obj="1"...
  • Page 264 ADOBE FIREWORKS CS3 Extending Guide All other object IDs are generated when the object is created, and may or may not have the same IDs between appli- cation invocations. Data node The data node is the most important type of XML node in RPC. Methods called through the...
  • Page 265 ADOBE FIREWORKS CS3 Extending Guide Data type Node name Example Description server The server object data type. The <obj value="fw" value object attribute is set to the object ID. The class class="Fireworks" /> attribute is optional. The server always specifies the object class when sending replies to the client.
  • Page 266 Generating stubs for nonstandard client types If the client is not written in one of the languages for which Adobe provides a client RPC library, the client imple- menter must create or generate the stubs. For information about how to do this, see “The Fireworks Object Model”...
  • Page 267 ADOBE FIREWORKS CS3 Extending Guide DOM data type RPC data type Example Description array array Types map identically. <array></array> Boolean Boolean Both types are identical. Both contain <bool value="true" only two values: true false /> color string A color is a string with nine characters.
  • Page 268 ADOBE FIREWORKS CS3 Extending Guide DOM data type RPC data type Example Description object server object, or For an object type, the client can <obj value="1" /> dictionary simply specify a server object. However, for certain objects (such as objects of the...
  • Page 269 Script developers working with Fireworks objects. To learn more about using these functions, see “Creating auto- release blocks” on page 266 and “Accessing proxy objects” on page 267. These functions are defined in the supporting RPCMethods.as stubs file available for download from the Adobe website at www.adobe.com/go/fireworks_documentation.
  • Page 270 ADOBE FIREWORKS CS3 Extending Guide RPCMethods.AddToAutoReleasePool() Usage RPCMethods.AddToAutoReleasePool(proxyObject) Arguments The object to add to the current pool. proxyObject Returns Nothing. Description Adds an object to the current auto-release pool. This function is called by the auto-release block. If no object pool exists, this function does nothing.
  • Page 271 To build a Flash application that uses RPC to create a Fireworks object: Download the supporting ActionScript stub files (a series of supporting ActionScript files) from the Adobe website, you need to put them in your working directory (where the new FLA file will reside).
  • Page 272 ADOBE FIREWORKS CS3 Extending Guide //Hide all panels - this function commented out as it will crash if run from inside Fireworks //fw.setHideAllFloaters(true); //Define the document objects the long way var res = new Object(); res.units = "inch"; res.pixelsPerUnit = 72;...
  • Page 273: Flash Panels

    Fireworks contains Adobe Flash Player, which plays Shockwave files as panels and commands in the Fireworks interface. You can also add a Adobe API wrapper extension to Adobe Flash for creating Shockwave files that communicate with the Fireworks API. By leveraging the new API communication between Adobe Flash and Fireworks, Fireworks extension developers can create command interfaces and dialog boxes that go beyond the dialog boxes supported in previous versions.
  • Page 274 Fireworks interface. Embedding API commands 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. MMExecute() Usage...
  • Page 275 MMExecute() MMEndCommand() to be used in conjunction with them. After it is installed, the API wrapper appears in the Adobe Flash interface. This wrapper simplifies the writing of Fireworks commands. Instead of having to embed every Fireworks function in , you can use a series of functions in the ActionScript.
  • Page 276 ADOBE FIREWORKS CS3 Extending Guide Events Fireworks events for Flash panels allow developers to write event handlers for specific user interaction. For example, a panel for creating a customized shape can respond to the user changing the stroke attribute, and make changes to the lines in the shape accordingly.
  • Page 277 Publishing When testing your script, use the File > Publish menu option in Adobe Flash. The Shockwave file is in the same place as the FLA file after publishing.
  • Page 278 Shockwave file passes to the Fireworks API during execution. Place these debug functions around the suspect code in your Adobe Flash ActionScript to turn the debugging functions on or off as needed. Be careful to use these functions only around “suspect” code; otherwise, you might encounter a long series...
  • Page 279: Chapter 8: Auto Shapes

    Auto Shapes are vector objects that contain information about how the user can interact with them on the screen. Auto Shapes appear in the Adobe Fireworks user interface as “Auto Shapes” but are programmatically called smart- Shape objects in the JavaScript code that constructs them. For example, a spiral shape consists of relationships among several smaller objects.
  • Page 280 ADOBE FIREWORKS CS3 Extending Guide Defining the shape The following code creates the initial shape, a rectangle (a more concise way of creating an initial shape follows this example): function InsertSmartShapeAt() smartShape.elem.elements[0] = new Path; smartShape.elem.elements[0].contours[0] = new Contour; smartShape.elem.elements[0].contours[0].nodes[0] = new ContourNode;...
  • Page 281 ADOBE FIREWORKS CS3 Extending Guide The Auto Shape is an array of ContourNode objects (see “ContourNode object” on page 211). You can write a “helper” function to simplify the code and assign ContourNode properties, as shown in the following example: function addPathPoint(contour, i, x, y) var theNodes = contour.nodes;...
  • Page 282 ADOBE FIREWORKS CS3 Extending Guide Adding control points After selecting an Auto Shape in a document, the user can click its control points to adjust the object. You must define the control points for your Auto Shape before you can define what happens to the object when the user manipulates them.
  • Page 283 ADOBE FIREWORKS CS3 Extending Guide • "EndDragControlPoint" Fireworks sends this message when the drag operation is complete. • "SmartShapeEdited" Fireworks sends this message when any change has been made to the Auto Shape (for example, when the user deletes a node).
  • Page 284 ADOBE FIREWORKS CS3 Extending Guide Function Description Tells Fireworks what to do when the user clicks and holds the mouse button on a BeginDragCon- control point. Fireworks can change the object as the user moves the mouse (for trolPoint() 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”...
  • Page 285 ADOBE FIREWORKS CS3 Extending Guide You can see this statement in each of the Auto Shape JavaScript files. Again, a single Auto Shape object may switch not need to process every message Fireworks sends, so only the useful messages are written into the JavaScript file using the qualifier.
  • Page 286 ADOBE FIREWORKS CS3 Extending Guide Supporting functions and methods Because the Auto Shape file is written in JavaScript, your functions can use global variables, common functions, and the Fireworks JavaScript API. The Auto Shape JavaScript file contains the definition of the shape’s points, and a series of functions to handle the Fireworks messages as the user interacts with the shape.
  • Page 287: Chapter 9: Rich Symbols

    Symbol Properties panel. Beginning with Fireworks CS3, you can also export common library assets as known components for use in Adobe Flex™ Builder.™ The MXML export feature allows you to create a Flex application layout in Fireworks, leveraging Flex common library assets as MXML for loading into Flex Builder.
  • Page 288 ADOBE FIREWORKS CS3 Extending Guide function applyCurrentValues() var currValues = Widget.elem.customData["currentValues"]; // Get symbol object name var Check = Widget.GetObjectByName("Check"); Check.visible = currValues[0].value; switch (Widget.opCode) case 1: setDefaultValues(); break; case 2: applyCurrentValues(); break; default: break; This sample JavaScript shows a rich symbol that can change colors: function setDefaultValues() var currValues = new Array();...
  • Page 289 ADOBE FIREWORKS CS3 Extending Guide Attributes Type element.left integer element.width integer element.height integer element.pixelRect rect(left,top,roght,bottom) element.visible boolean element.opacity integer element.blendmode string element.effectList object element.name string element.mask object element.pathattrs.burshColor color element.pathattrs.fillColor color element.pathattrs.brush object element.pathattrs.fill object element.pathattrs.brushTexture object element.pathattrs.fillTexture object element.pathattrs.fillHandle1 point element.pathattrs.fillHandle2...
  • Page 290 ADOBE FIREWORKS CS3 Extending Guide Attributes Type element.pathattrs.fill.ditherColors object element.pathattrs.fill.webDitherTransparent boolean element.pathattrs.fill.shape string element.pathattrs.fill.gradient object element.pathattrs.fill.pattern object element.pathattrs.fill.gradient.name string element.pathattrs.fill.gradient.nodes object element.pathattrs.fill.gradient.opacityNodes object element.pathattrs.fill.gradient.color color element.pathattrs.fill.gradient.position integer element.pathattrs.fill.gradient.isOpacityNode boolean element.pathattrs.fill.pattern.name string element.pathattrs.fill.pattern.image object element.pathattrs.brush.category string element.pathattrs.brush.name string element.pathattrs.brush.angle long element.pathattrs.brush.aspect integer element.pathattrs.brush.diameter...
  • Page 291 ADOBE FIREWORKS CS3 Extending Guide Attributes Type element.pathattrs.brush.textureEdge integer element.pathattrs.brush.tipSpacing integer element.pathattrs.brush.tipSpacingMode string element.pathattrs.brush.tipColoringMode string element.pathattrs.brush.numDashes long element.pathattrs.brush.dashOnSize1 long element.pathattrs.brush.dashOffSize1 long element.pathattrs.brush.dashOnSize2 long element.pathattrs.brush.dashOffSize2 long element.pathattrs.brush.dashOnSize3 long element.pathattrs.brush.minSize integer element.pathattrs.brush.dashOffSize3 long element.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.mask.showAttrs...
  • Page 292: Mxml Export

    The Flex application framework consists of MXML, ActionScript 3.0, and the Flex class library. Developers use MXML to declaratively define the application user interface elements and use ActionScript for client logic and procedural control. Developers write MXML and ActionScript source code using the Adobe Flex Builder™ IDE or a standard text editor.
  • Page 293 ADOBE FIREWORKS CS3 Extending Guide Flex Component Definitions for MXML and Images Export When exporting a Fireworks document with the MXML and Image export, Fireworks checks each element’s property for definitions that dictate how that element should appear in the resulting MXML. If no customData MXML-related definitions are found, the element is exported as an image.
  • Page 294 ADOBE FIREWORKS CS3 Extending Guide Example classDefinition = new Object(); element.customData["flexClassDefinition"] = classDefinition; object includes any number of the following properties, all of which are themselves flexClassDefinition optional. margin Rectangle. Defines the area around the element that is not part of the Flex component shape but takes up space in Fireworks (for example, the Panel component in Flex has a drop shadow that is not included as part of the panel’s...
  • Page 295 ADOBE FIREWORKS CS3 Extending Guide sizeOffset Object. Defines a size offset to 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.
  • Page 296 ADOBE FIREWORKS CS3 Extending Guide If this list is not defined, all default properties are added to the attribute list (where applicable). If defined, only those listed will be provided. Note: cannot be style properties. Omitting from will not defaultProperties...
  • Page 297 2: applyCurrentValues(); break; A document containing this rich symbol that is exported using the MXML and Images export would result in the following MXML document. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="660" height="440" layout="absolute" backgroundGradientColors="[#FFFFFF]" xmlns:ns="http://www.example.com/2007/mxml"> <mx:Style> Star { color:#FFFFFF;...
  • Page 298: Chapter 10: Additional Fireworks Functions

    Chapter 10: Additional Fireworks Functions This chapter lists additional JavaScript functions supported by Adobe Fireworks that let you create useful Fireworks extensions and customized Fireworks menus. Almost any task that the user can accomplish in Fireworks with the menus, tools, or floating panels can be done programmatically using JavaScript.
  • Page 299 ADOBE FIREWORKS CS3 Extending Guide Description Makes the Property inspector window invisible. fw.isPIExpanded() Availability Fireworks MX. Usage fw.isPIExpanded() Arguments None. Returns A Boolean value: if expanded; otherwise. true false Description Determines whether the Property inspector window is currently expanded or minimized fw.isPIVisible()
  • Page 300 ADOBE FIREWORKS CS3 Extending Guide Returns Nothing. Description Expands the Property inspector window. fw.shrinkPIWindow() Availability Fireworks MX. Usage fw.shrinkPIWindow() Arguments None. Returns Nothing. Description Minimizes the Property inspector window. fw.setPIPosition() Availability Fireworks MX. Usage fw.setPIPosition(pt) Arguments A point in screen coordinates.
  • Page 301: History Panel Functions

    ADOBE FIREWORKS CS3 Extending Guide Arguments None. Returns A point object that is formatted as (see “Point data type” on page 6 for syntax details), which {x: float y: float} contains the location of the Property inspector. Description Retrieves the location, in screen coordinates, of the upper-left corner of the Property inspector window.
  • Page 302 ADOBE FIREWORKS CS3 Extending Guide fw.historyPalette.getSelection() Availability Fireworks 3. Usage fw.historyPalette.getSelection() Arguments None. Returns A zero-based array that represents which History panel steps are selected. Description Determines which steps in the History panel are selected. fw.historyPalette.getStepCount() Availability Fireworks 3. Usage fw.historyPalette.getStepCount()
  • Page 303 ADOBE FIREWORKS CS3 Extending Guide Description Gets the JavaScript equivalent of the specified steps. See also fw.historyPalette.replaySteps() fw.historyPalette.getUndoState() Availability Fireworks 3. Usage fw.historyPalette.getUndoState() Arguments None. Returns The string to use with fw.historyPalette.setUndoState() Description Returns a string that indicates the current undo state to be used for later calls to fw.historyPalette.setUn-...
  • Page 304 ADOBE FIREWORKS CS3 Extending Guide See also fw.historyPalette.getStepsAsJavaScript() fw.historyPalette.saveAsCommand() Availability Fireworks 3. Usage fw.historyPalette.saveAsCommand(array of indexes, {filename}) Arguments Indicates which steps from the History panel should be saved. For example, to save the first, array of indexes third, and sixth steps in the History panel, pass [ ].
  • Page 305: Static Document Functions

    ADOBE FIREWORKS CS3 Extending Guide Usage fw.historyPalette.setUndoState(undoStateString) Arguments The string returned by undoStateString fw.historyPalette.getUndoState() Returns Nothing. Description Performs the correct number of undo or redo operations to arrive at the selected state. See also “fw.historyPalette.getUndoState()” on page 299 Static Document Functions Fireworks has an older static Document object that has been deprecated in favor of the Document object in the DOM.
  • Page 306 ADOBE FIREWORKS CS3 Extending Guide Arguments The name of the file, which is expressed as a file://URL, whose extension should be changed to .png. fileURL Returns A string that contains the file URL with a .png extension. Description Ensures that the specified file URL ends in a .png extension. Does not affect the name of the file on disk.
  • Page 307: Index

    Index icons 275 Contour object 211 ActionScript 269 switch statement 280 ContourNode object 211 cross-product extensions 257 ContourNodeDynamicInfo object 212 addBehavior() 23, 24 Contrast properties (Effect addElementMask() 27 BeginDragControlPoint 278 object) 216 addFrames() 28 BeginDragInsert 278 ControlPoint object 213 addGuide() 28 Behavior object 208 conventions, in book 2 addNewHotspot() 29...
  • Page 308 INDEX 304 dom.group() 78 dom.attachTextToPath() 43 dom.enableElementMask() 67, 85, 103, 107, 112 dom.setAnimInstanceStartFrame( dom.changeGuide() 43, 44 ) 121 dom.enableTextAntiAliasing() 68 dom.changeSliceGuide() 45 dom.enterElementMaskEditMode() dom.setGroupType() 138 dom.clearJPEGMask() 45 dom.setPixelMask() 146 dom.clipCopy() 46 dom.enterPaintMode() 69 mask to image 222 dom.clipCopyAsPaths() 46 dom.exitElementMaskEditMode() 6 mask to path 222 dom.clipCopyFormats() 47 DestroyAutoReleasePool() 265...
  • Page 309 INDEX 305 dom.moveBezierHandleBy() 88 dom.rotateSelection() 109 dom.setDocumentCanvasSizeToDoc umentExtents() 127 dom.moveElementMaskBy() 89 dom.save() 110 dom.setDocumentCanvasSizeToSele dom.moveFillVectorHandleBy() 89 dom.saveCopyAs() 110 ction() 128 dom.moveMaskGroupContentsBy() dom.saveJPEGMask() 111 dom.setDocumentImageSize() 128 dom.saveSelection() 111 dom.setDocumentResolution() 129 dom.movePixelMaskBy() 90 dom.scaleSelection() 112 dom.setEffectName() 129, 130, 131 dom.movePointOnHotspotBy() 91 dom.selectAdjustPixelSel() 113 dom.setElementMaskMode() 130, dom.movePointOnHotspotByWithF dom.selectAll() 113...
  • Page 310 INDEX 306 dom.setSelectionMask() 149 dom.ungroup() 168 enableTextAntiAliasing() 68 dom.setShowEdges() 150 dom.updateSymbol() 167 EndDragControlPoint 279 dom.setShowGammaPreview() 150 DragControlPoint 278 EndDragInsert 278 dom.setShowGrid() 151 dragControlPoint() 62 end-of-line character 16 dom.setShowGuides() 151 DragInsert 278 ENoActiveDocument 14 dom.setShowRulers() 151 Drop Shadow (Effect object) 217 ENoActiveSelection 14 dom.setShowSliceGuides() 152 duplicateFrame() 63...
  • Page 311 INDEX 307 Fill object 233 fw.chooseScriptTargetDialog() 176 fw.launchApp() 192 fills, finding and replacing 18 fw.closeDocument() 176 fw.launchBrowserTo() 192 fillSelectedPixels() 71 fw.createDocument() 177 fw.locateDocDialog() 193 filterSelection() 72 fw.createDocumentWithDialog() 17 fw.openDocument() 194 filterSelectionByName() 72, 73 fw.popupColorPicker() 194 fw.createFireworksDocument() 178 Find (core object) 17 fw.popupColorPickerOverMouse() 1 fw.disableFlashDebugging() 179 Find Edges (Effect object) 218...
  • Page 312 INDEX 308 getHTMLFileForScript() 191 importFile() 79 makeActive() 87 getNumberOfTables() 191 importSymbol() 80 getPIPosition() 296 importSymbolButNotAsAlias() 80 makeFind() 86 makeGoodNativeFilePath() 301 getPixelMask() 75 index arguments 6 mask 5 getPref() 191 inLaunchAndEdit() 81 matrix 6 getRootDirectory() 7 Inner Shadow (Effect object) 218 mergeDown() 87 getSelection() 298 insertPointInPath() 81...
  • Page 313 INDEX 309 ContourNode 211 stubs 262 palette 7 ContourNodeDynamicInfo 212 removeAllGuides() 100 ControlPoint 213 panel 7 removeBehavior() 101 panels, custom 269 Effect 214 removeBrush() 101 Path object 225 EffectList 221 removeCharacterMarkup() 101 PathAttrs object 236 Element 221 removeElementMask() 102 pathCrop() 95 ElementMask 226 removeFill() 103 pathExpand() 96...
  • Page 314 INDEX 310 saveDocumentCopyAs() 200 setDocumentCanvasSizeToDocume setQuadrangle() 148 ntExtents() 127 saveJPEGMask() 111 setRectRoundness() 148 setDocumentCanvasSizeToSelection saveJsCommand() 200 setRectSides() 149 () 128 saveSelection() 111 setSelection() 300 setDocumentImageSize() 128 scaleSelection() 112 setSelectionBounds() 149 setDocumentResolution() 129 selectAdjustPixelSel() 113 setSelectionMask() 149 setEffectName() 129, 130, 131 selectAll() 113 setShowEdges() 150 setElementMaskMode() 130, 131...
  • Page 315 INDEX 311 Sharpen (Effect object) 220 Working with selected elements 6 Sharpen More (Effect object) 220 showAllHidden() 165 writePanelStateToFile() 206 showPIWindow() 294 shrinkPIWindow() 296 XML 257 SingleTextRun object 241 sliced images 247 SliceHotspot object 224 yesNoDialog() 206 SliceInfo object 253 Slices object 255 Slices.htt 247 smartShape 259...

This manual is also suitable for:

Fireworks cs3

Table of Contents