MACROMEDIA FIREWORKS MX 2004-EXTENDING FIREWORKS Manual

Extending fireworks
Hide thumbs Also See for FIREWORKS MX 2004-EXTENDING FIREWORKS:

Advertisement

Quick Links

Extending Fireworks

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA FIREWORKS MX 2004-EXTENDING FIREWORKS

  • Page 1 Extending Fireworks...
  • Page 2 If you access a third-party Web site mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites.
  • Page 3: Table Of Contents

    CONTENTS CHAPTER 1: Extending Fireworks Overview ......5 Prerequisites ............5 Installing an extension.
  • Page 4 Contents...
  • Page 5: Chapter 1: Extending Fireworks Overview

    CHAPTER 1 Extending Fireworks Overview To extend Macromedia Fireworks MX 2004, 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: Installing An Extension

    To install an extension: Download and install the Extension Manager, which is available on the Macromedia Downloads website (www.macromedia.com/software/downloads). Log on to the Macromedia Exchange website (www.macromedia.com/exchange).
  • Page 7: Conventions Used In This 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 Fireworks Online Forums. The Fireworks Online Forums are available through www.macromedia.com/ support/fireworks/ts/documents/fwnewsgroup.htm. Additional resources for extension writers...
  • Page 8 Chapter 1: Extending Fireworks Overview...
  • Page 9: Chapter 2: The Fireworks Object Model

    CHAPTER 2 The Fireworks Object Model If you want to extend the functionality of Macromedia Fireworks MX 2004 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 makes up the Fireworks Object Model, containing the following major components: •...
  • Page 10 Accessing a Fireworks document All the functions listed in “Document functions” on page 104 are methods of the Document object, which represents a Fireworks document. To perform a function on a Document object, you must first get the Document Object Model (DOM) of the document. You then call the functions as methods of that DOM.
  • Page 11 Formatting nonstandard data types In addition to the standard data types that can be passed to functions as arguments, or used as properties, such as integer, string, and so on, Fireworks accepts other data types. • Some functions accept values that are Fireworks objects. For an explanation of these objects, “The Fireworks Object Model”...
  • Page 12: Global Methods

    Resolution data type The format for resolution is . Acceptable values for {pixelsPerUnit: float, units: string} units are " " or " ". For instance, could look inch dom.setDocumentResolution(resolution) like the following example: fw.getDocumentDOM().setDocumentResolution({pixelsPerUnit:72, units:"inch"}); Global methods The following table lists the global Fireworks methods, along with their argument data types and, where appropriate, acceptable values and notes.
  • Page 13 Document object 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 “Document functions”...
  • Page 14 Property Data type Notes frameLoopingCount integer –1 — don’t repeat 0 — repeat forever > 0 — repeat this number of times array Array of Frame objects in the document (see frames • “Frame object” on page 52). gammaPreview Boolean If set to , the document should be true...
  • Page 15 Property Data type Notes lastExportDirectory string The path to the last directory to which the file was exported, which is expressed as file:// URL, or if the file was never exported. null For instance, if the document was last exported to " file:///files/current/ , it returns logo.gif"...
  • Page 16 The software used to create the document. The current version of Software Fireworks always sets this value to “Macromedia Fireworks MX 2004.” 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 17 Here is an alphabetical list of the properties of the Errors object: EAppAlreadyRunning, EAppNotSerialized, EArrayIndexOutOfBounds, EBadFileContents, EBadJsVersion, EBadNesting, EBadParam, EBadParamType, EBadSelection, EBufferTooSmall, ECharConversionFailed, EDatabaseError, EDeletingLastMasterChild, EDiskFull, EDuplicateFileName, EFileIsReadOnly, EFileNotFound, EGenericErrorOccurred, EGroupDepth, EIllegalThreadAccess, EInternalError, ELowOnMem, ENoActiveDocument, ENoFilesSelected, ENoNestedMastersOrAliases, ENoNestedPasting, ENoSliceableElems, ENoSuchElement, ENotImplemented, ENotMyType, EOutOfMem, EResourceNotFound, ESharingViolation, EUnknownReaderFormat, EUserCanceled, EUserInterrupted, EWrongType Files object...
  • Page 18 Method Data type Notes deleteFileIfExisting (docOrDir) string Deletes the specified file or directory. Returns if successful; if the file or true false directory cannot be deleted. Unlike , this method returns if the deleteFile() true file or directory does not exist. enumFiles(docOrDir) string Returns an array of file URLs.
  • Page 19 Method Data type Notes makePathFromDirAndFile(dirname, string, string The first argument must be expressed as file:/ plainFilename) /URL. Concatenates the two arguments to return a file URL that references the specified filename in the specified directory. For example, Files.makePathFromDirAndFile("file:/// returns work/reports", "logo.png") "file:/ //work/reports/logo.png".
  • Page 20 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 whatToFind are associated with each legal value for .
  • Page 21 Finding and replacing colors, fills, strokes, and effects Property Data type Notes string In the format: whatToFind "color" find string A color string that specifies the color to find (see “Color string data type” on page 11). string A color string that specifies the color to use replace as a replacement (see “Color string data...
  • Page 22: The Fireworks Object

    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 23 The name of the application ( appName "Fireworks MX ). This attribute is part of the common 2004" API, so it also appears as app.appName implemented in Macromedia Dreamweaver). • string The path to the Patterns directory, which is appPatternsDir expressed as file://URL. string...
  • Page 24 Property Data type Notes currentScriptDir string The path to the directory of the currently running script, which is expressed as a file:// URL (or could be null This path goes to the directory in which the script resides, not a full file path to the script itself (it excludes the script’s filename).
  • Page 25 Property Data type Notes selection array Array of the selected objects in the active document. If nothing is selected, it returns an array of length zero. If no document is open, it returns null object If a single item is selected and that item is a selectedMask mask, this property returns an ElementMask object (see...
  • Page 26: Objects Within Fireworks Documents

    Objects within Fireworks documents This section 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 10 “Passing values”...
  • Page 27 Property Data type Notes diameter integer 0 to 1000 string Acceptable values are feedback "none" "brush" "background" flowRate float 0 to 100 integer 0 to 64 maxCount float 0 to 100 minSize name string The name of the brush, which is visible in the Stroke panel.
  • Page 28 Property Data type Notes 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 sense_vdir_hue float float sense_vdir_lightness float sense_vdir_opacity sense_vdir_saturation float float sense_vdir_scatter float sense_vdir_size integer 0 to 100, where x is a value of sensitivity_x_y pressure, , or...
  • Page 29 Property Data type Notes tipSpacingMode string Acceptable values are "random" "diagonal" "circular" string Acceptable values are type "natural" "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. Property Data type Notes...
  • Page 30 Property Data type Notes succY float The y coordinate of the contour node’s following control point. float The x coordinate of the contour node’s main control point. float The y coordinate of the contour node’s main control point. The following table lists the methods of the ContourNode object, along with their parameters. Method Parameter Definition...
  • Page 31 ContourNodeDynamicInfo object The following table lists the properties of the ContourNodeDynamicInfo object, along with their data types and, where appropriate, acceptable values and notes. Property Data type Notes float 0.0 to 65,535.0 milliseconds duration pressure float 0.0 to 1.0 float 0.0 to 255.9999 pixels per millisecond velocity ControlPoint object...
  • Page 32 Method Parameter Definition object The RegisterMoveParms object containing the move parameters. Use smartShape.GetDefaultMoveParms() obtain this object, then adjust properties as needed. For a list of properties, see “RegisterMoveParms object” on page point The center point for the circular movement. RegisterCircularMove() object The RegisterMoveParms object containing the move parameters.
  • Page 33 Property Data type Notes BevelType integer Sets a bevel as inner, outer, raised embossed, inset embossed, or glow effect, as follows: InnerBevel = 0 OuterBevel = 1 RaiseEmboss = 2 InsetEmboss = 3 GlowEffect = 4 integer The width of the bevel, in pixels. BevelWidth integer ButtonState...
  • Page 34 Property Data type Notes MaskSoftness integer The feather amount on the glow edge, in pixels. string A color string that specifies the color of the OuterBevelColor outer bevel effect (see “Color string data type” on page 11). ShadowColor string A color string that specifies the color that is blended to provide the bevel shadow effect (see “Color string data type”...
  • Page 35 Property Data type Notes EffectIsVisible Boolean If set to , the effect is included but false temporarily hidden. The default value is true string EffectMoaID "{3439b08c-1921-11d3-9bde00e02910d580}" Convert to Alpha object Property Data type Notes Boolean If set to , the effect is included but EffectIsVisible false temporarily hidden.
  • Page 36 Find Edges object Property Data type Notes Boolean If set to , the effect is included but EffectIsVisible false temporarily hidden. The default value is true string EffectMoaID "{fc7093f1-f95c-11d0-8be200a024cdc039}" Gaussian Blur object Property Data type Notes EffectIsVisible Boolean If set to , the effect is included but false temporarily hidden.
  • Page 37 Property Data type Notes ShadowDistance integer The offset of the shadow, in pixels. integer ShadowType 0 = normal shadow 1 = knockout shadow Invert object Property Data type Notes EffectMoaID string "{d2541291-70d6-11d1-8c8000a024cdc039}" Boolean If set to , the effect is included but EffectIsVisible false temporarily hidden.
  • Page 38 Property Data type Notes gamma_rgb float These gamma* values are all gamma levels to the filter, with values of 0.1 to 10.0.< gamma_red gamma_green gamma_blue Sharpen object Property Data type Notes string EffectMoaID "{c20952b1-fc76-11d0-8be700a024cdc039}" EffectIsVisible Boolean If set to , the effect is included but false temporarily hidden.
  • Page 39 Element object Element is an abstract or base class; nothing of class Element ever exists. However, it is useful for simplifying the other class descriptions. Read-only properties are marked with a bullet (•). Property Data type Notes string Acceptable values are blendMode "normal"...
  • Page 40 The following table lists the methods of the Element object, along with their parameters. Method Parameter Definition root The root parameter is a string value that is generateSmartShapeCode prefixed to each line of output. Group object Group is a subclass of the base class Element and contains the following properties in addition to those in Element (see “Element object”...
  • Page 41 Method Parameter Definition RegisterForEvent() string Call this to receive notification of the string specifying a Fireworks event. will be the name of smartShape.operation the event triggered. Returns the total number of events registered after adding the specified event. none Undoes the previous transformation. removeTransformation() smartShapeToGlobalCoords() point...
  • Page 42 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 (see “Element object” on page 39). Property Data type Notes string Text that is written into the HTML Alt tag...
  • Page 43 Property Data type Notes sliceKind string If set to , generates an image; if set to "image" , generates the text specified by "empty" htmlText string This string contains all the attributes of a tdTagText table cell except the colspan values.
  • Page 44 Property Data type Notes orientation string Acceptable values are "horizontal left to (the default), right" "vertical right to , and left" "horizontal right to left" "vertical left to right" object PathAttrs object (see “PathAttrs object” pathAttributes on page 54). float A 32-bit integer.
  • Page 45 ElementMask object The following table lists the properties of the ElementMask object, along with their data types and, where appropriate, acceptable values and notes. Property Data type Notes Boolean If set to , and the element mask is an autoExpandImages true image, the image is automatically expanded to fill the entire document, with areas...
  • Page 46 Property Data type Notes frameName string The name of the frame displayed in the Frames panel. Default is null string GIF89a frame disposal method. See the gifDisposalMethod GIF89a specification for details. Acceptable values are (the default), "unspecified" "none" "background", "previous" ExportOptions object Note: When this object is used to set properties, the only required property is .
  • Page 47 Property Data type Notes colorMode string Acceptable values are (the "indexed" default) , and , "24 bit" "32 bit" Boolean The default value is crop false. cropBottom integer The default value is integer The default value is cropLeft integer The default value is cropRight cropTop integer...
  • Page 48 Property Data type Notes paletteMode string Acceptable values are (the "adaptive" default), "custom" "grid" "monochrome" , and "Macintosh" "Windows" "exact" "Web 216". string Acceptable values are (the default), paletteTransparencyType "none" , and "index" "index alpha" "rgba". integer 1 to 100,000; default value is percentScale Boolean The default value is...
  • Page 49 “HTML and Images” “Images Only” “Dreamweaver LBI” "Director HTML" "CSS Layers" "Layers to Files" "Frames to Files" "Lotus Domino" "Macromedia Flash SWF" "Illustrator" "Photoshop" string Defines the extension to append to fileExtensions the filename. Boolean If set to , generates multiple HTML...
  • Page 50 Property Data type Notes through string Used to generate a name by concatenating sliceAutoNaming1 six strings. If you need fewer than six strings, sliceAutoNaming6 fill in the remaining strings with "none" Acceptable values are: — generates nothing. "none" — generates a unique row and "row_col"...
  • Page 51 Property Data type Notes string Used to generate a name by concatenating sliceFrameNaming1 two strings; the resulting string is sliceFrameNaming2 concatenated to the name specified by . If you need fewer than two sliceAutoNaming strings, fill in the remaining string with "none"...
  • Page 52 Property Data type Notes shape string Acceptable values are "solid" "linear" "radial" "conical" "satin" "pinch" "folds" "elliptical" "rectangular" , and "bars" "ripple" "waves" "pattern" "web dither" stampingMode string Acceptable values are "blend" "blend opaque" float 0 to 100 textureBlend webDitherTransparent Boolean If set to (and...
  • Page 53 Gradient object The following table lists the properties of the Gradient object, along with their data types and, where appropriate, acceptable values and notes. Property Data type Notes string The name that appears in the Fill panel. name nodes array Array of GradientNode objects (see “GradientNode object”...
  • Page 54 Layer object The following table lists the properties of the Layer object, along with their data types and, where appropriate, acceptable values and notes. Read-only properties are marked with a bullet (•). Property Data type Notes Boolean If set to , the Layers list displays all the disclosure true...
  • Page 55 Pattern object The following table lists the property of the Pattern object, along with its data type and notes. Property Data type Notes name string The name that appears in the Fill panel. RectanglePrimitive object The following table lists the properties and methods of the RectanglePrimitive object, along with their data types and, where appropriate, acceptable values and notes.
  • Page 56 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 constrainAngles point constrains the angles to the minAngle values.
  • Page 57 Property Data type Notes constrain45Key string The key value that you want to use to constrain movement to the nearest 45º increment. Can be one of the following: "none" "shiftKey" "ctrlCmdKey" "altOptKey" A key value of means dragging will "none" not be constrained, (or other "shiftKey"...
  • Page 58 Property Data type Notes deltaXtoX float The ratio of mouse movement to the movement of the referenced point’s x coordinate. For example, means that when the mouse moves 1 pixel to the right, the referenced point also moves 1 pixel to the right.
  • Page 59 Property Data type Notes maxX float The maximum value the x coordinate can move. float The maximum value the y coordinate maxY can move. point The minimum angle that can be set. minAngle The minimum amount the point can move minLinear float along a line .
  • Page 60 SmartShape object The following table lists the properties of the SmartShape object, along with their data types and, where appropriate, acceptable values and notes. Property Data type Notes • Boolean Indicates whether the Alt/Option key is altOptKeyDown pressed ( if pressed, otherwise true false Boolean...
  • Page 61 The following table lists the method of the SmartShape object, along with its parameter. Method Parameter Definition object Returns an object that has all of the default GetDefaultMoveParms() move parameters set. Style object The following table lists the properties of the Style object, along with their data types and, where appropriate, acceptable values and notes.
  • Page 62 Property (read-only) Data type Notes Boolean If set to , applies the property of the use_fill true fill pathAttrs object when applying the style. If set to , ignores the property. The false fill default value is false Boolean If set to , applies the property use_fillColor...
  • Page 63 Property Data type Notes kerning float Also known as pair kerning, kerning specifies the percentage of an em square by which to separate two characters, in addition to the amount the font specifies. Applies to only one pair or characters. To specify kerning for a range of text, use the property.
  • Page 64: Html Export Objects

    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 65 Property (read-only) Data type Notes hasTargetFrame Boolean For swap image behaviors, if the swap true image swaps in another frame in the Fireworks file. The value of hasTargetFrame is always the opposite of ; you cannot hasHref swap from two sources. horzOffset integer is set to 9 (Popup Menu),...
  • Page 66 exportDoc object The following table lists the properties of the exportDoc object, along with their data types and, where appropriate, acceptable values and notes. All properties are read-only. exportDoc Note: This object type does not start with a capital letter. Property (read-only) Data type Notes...
  • Page 67 Property (read-only) Data type Notes generateHeader Boolean Set to if an HTML file is generated; true if the output goes to the Clipboard. false Boolean Set to if the Fireworks document has an hasAltText true alternate text description. Boolean Set to if the Fireworks document has a hasBackgroundLink true...
  • Page 68 Property (read-only) Data type Notes tableAlignment string A string that contains the alignment of the table. If the table is left-aligned, the string is simply a space (this is used for writing the HTML table). If the table is center-aligned, the string is .
  • Page 69 Property (read-only) or Method Data type Notes xCoord(index) zero-based index Returns the x coordinate for the specified point, in pixels. For example, the following commands return the coordinates for the first point: var x = imagemap.xCoord(0); var y = imagemap.yCoord(0); It is possible to have negative values if the image map area is drawn so that it crosses the left or top sides of the image (or...
  • Page 70 Property (read-only) or method Data type Notes getFrameFileName (frameIndex) zero-based index Returns a string that is the filename for the slice on the specified frame, without directory or extension information. For example, when exporting a file base named Button Slices[0][0].getFrameFileName(0) returns .
  • Page 71 Property (read-only) or method Data type Notes setFrameFileName (frameIndex) zero-based index Sets the filename for the slice on the specified frame, without directory or extension information. You can stop an image from being exported by setting its name to (an empty string). ""...
  • Page 72: Working With Selected Objects

    The following table lists the properties of the Slices object, along with their data types and, where appropriate, acceptable values and notes. All Slices object properties are read-only. Property (read-only) Data type Notes zero-based index Index for each file generated for multiple file demoIndex button export.
  • Page 73 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. Note: The return value for a property may be null Working with properties for any selected object...
  • Page 74 Working with specific properties for selected elements Some elements have specific properties that can be returned and set in addition to those that can be set for selected objects (see “Working with properties for any selected object” on page 73). These specific properties are available for each of the following elements when the elements are selected.
  • Page 75 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 To return the for the currently selected instance, type the following code: instanceType instance = fw.selection[0].instanceType;...
  • Page 76 RectanglePrimitive • Roundness • pathAttributes Note: For the complete list of path attributes properties, see “pathAttributes” on page • originalSides • transform To return the roundness setting for the currently selected rectangle, type the following code: roundness = fw.selection[0].roundness; pathAttributes Several objects have the property.
  • Page 77: Chapter 3: Cross-Product Extensions

    They may use JavaScript APIs for adding image-editing functionality to those applications, as well as custom Fireworks panels developed in Macromedia Flash MX 2004 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 78 Fireworks RPC transactions pass XML between an RPC client and the Fireworks RPC server built into Fireworks MX 2004. 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 79 The RPC client sends four types of requests, specified in the XML tag name of the envelope: • operation retrieves the current object properties. The operation can contain only attributes and no subelements. In this example, the client requests the value name of the property of the object whose ID is 1:...
  • Page 80 Fireworks has four reserved object IDs: • "0" This is the Invalid Object ID, used for nonexistent or invalid objects. It is not frequently used for the RPC client, but it is used in several places for the RPC server. •...
  • Page 81 Data type Node name Example Description dictionary dict <dict><double key="foo" A dictionary data type. Like the array data value="5.0" /><string type, it is simply a container for other data key="bar" value="fred" / nodes. Each direct child node of a dictionary ></dict>...
  • Page 82 Parameters Parameters are simply data nodes with an attribute. The attribute identifies the order order order in which the parameters should be processed for the server. In this way, the RPC client can use any XML client library to build parameters in any order, and the RPC server retains the correct parameter order.
  • Page 83 Macromedia website: www.macromedia.com/support/fireworks/documentation.html. Generating stubs for nonstandard client types If the client is not written in one of the languages for which Macromedia provides a client RPC library, the client implementer must create or generate the stubs. For information about how to do this, see Chapter 2, “The Fireworks Object Model,”...
  • Page 84 DOM data type RPC data type Example Description date dictionary <dict> A date is a dictionary with the <int key="year" following subelement keys: year, value="2002" /> month, day, hour, minutes, and <int key="month" seconds. All six elements are value="9" /> integer data types.
  • Page 85 “Accessing proxy objects” on page 88. These functions are defined in the supporting RPCMethods.as stubs file available for download from the Macromedia website. Note: ActionScript Remote Procedure Calls for Fireworks are not ActionScript 1.0 compatible, and must be written in ActionScript 2.0 (using Flash MX 2004).
  • Page 86 RPCMethods.CreateAutoReleasePool() Usage RPCMethods.CreateAutoReleasePool() Arguments None. Returns Nothing. Description Starts the auto-release block. RPCMethods.DestroyAutoReleasePool() Usage RPCMethods.DestroyAutoReleasePool() Arguments None. Returns Nothing. Description Ends the auto-release block and frees all allocated remote objects in the current auto-release block function. RPCMethods.AddToAutoReleasePool() Usage RPCMethods.AddToAutoReleasePool(proxyObject) Arguments proxyObject The object to add to the current pool.
  • Page 87 RPCMethods.RemoveFromAutoReleasePool() Usage RPCMethods.RemoveFromAutoReleasePool(proxyObject) Arguments proxyObject The object to remove from the current pool. Returns Nothing. Description Removes an object from the current auto-release pool so that it can be used in another code block. RPCMethods.ReleaseObject() Usage RPCMethods.ReleaseObject(Object) Arguments The name of the object to release from memory. Object Returns Nothing.
  • Page 88 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 Macromedia website, you need to put them in your working directory (where the new FLA file will reside).
  • Page 89 //Create new doc var fwdoc = fw.createFireworksDocument(size, res, "#0033FF"); //Define a rectangle object the short way var rect = {left:10, top:10, right:210, bottom:210}; //Add Rectangle fwdoc.addNewRectanglePrimitive(rect,0.20); //Set its color fwdoc.setFillColor("#00CC99"); RPCMethods.DestroyAutoReleasePool(); RPCMethods.DestroyAutoReleasePool(); Publish the SWF file. When you publish the SWF file, make sure the stubs files are in the same directory as your FLA file.
  • Page 90: Flash Panels

    Fireworks contains Macromedia Flash Player, which plays Shockwave files as panels and commands in the Fireworks interface. You can also add a Macromedia API wrapper extension to Macromedia Flash for creating Shockwave files that communicate with the Fireworks API. By...
  • Page 91 After it is installed, the MMEndCommand() API wrapper appears in the Macromedia Flash interface. This wrapper simplifies the writing of Fireworks commands. Instead of having to embed every Fireworks function in...
  • Page 92 To install the API wrapper, make sure you have the Macromedia Extension Manager installed and double-click the Extension file. In Macromedia Flash, the wrapper appears in the Components window as FWCommandComponents. The following example shows a command without the wrapper: var path = MMExecute("fw.appPatternsDir;");...
  • Page 93 Creating event handlers To create an event handler, implement a function with the corresponding event name. Currently, Fireworks supports the following events for Flash panels: Event Description onFwStartMovie Sent to the SWF file right after Fireworks has started (or restarted) the SWF file. onFwStopMovie Sent to the SWF file right before Fireworks stops the file (and possibly unloads it).
  • Page 94 Publishing When testing your script, use the File > Publish menu option in Macromedia Flash MX. The Shockwave file is in the same place as the FLA file after publishing. Debugging Fireworks provides two functions to help debug Flash panel ActionScript (see “fw.enableFlashDebugging()”...
  • Page 95: Chapter 4 Auto Shapes

    Auto Shapes are vector objects that contain information about how the user can interact with them onscreen. Auto Shapes appear in the Macromedia Fireworks MX 2004 user interface as “Auto Shapes” but are programmatically called “smartShape” objects in the JavaScript code that constructs them.
  • Page 96: Creating An Auto Shape

    Creating an Auto Shape To create an Auto Shape, you need to define a series of properties for the shape, define the shape’s control points, and write functions that tell Fireworks how to handle the Auto Shape as the user interacts with the object (see “Handling the user interaction”...
  • Page 97 // Set the new point's values node.x = node.predX = node.succX = x; node.y = node.predY = node.succY = y; You can then simplify the function with the new helper function: InsertSmartShapeAt() function InsertSmartShapeAt() var elem = smartShape.elem; var newPath = new Path; elem.elements[0] = newPath;...
  • Page 98 Fireworks messages Fireworks passes the following messages to the SmartShape object as the user interacts with (inserts, moves, or changes) the shape: • "InsertSmartShapeAt" Fireworks sends this message when the user selects the shape from the Tools panel and clicks on the canvas, or drags the shape from the Auto Shapes panel to the canvas.
  • Page 99 The following table lists all of the available Fireworks message handler functions you can create (although, you don’t have to write a response to every Fireworks message, only the ones important to your Auto Shape): Function Description Draws the initial shape. This function is called when the user selects the InsertSmartShapeAt() shape from the Tools panel and clicks on the canvas, or drags the shape from the Auto Shapes panel to the canvas.
  • Page 100 These functions correspond directly with the messages listed in “Fireworks messages” on page To invoke your own function names in response to Fireworks messages, you need to write a statement. switch() Switch Statements If you take a look at some existing Auto Shapes (in the Configuration/Auto Shapes folder and in the Configuration/Auto Shape Tools folders), you’ll notice a statement near the switch()
  • Page 101 Supporting functions and methods Since 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 102 Chapter 4: Auto Shapes...
  • Page 103: Chapter 5: Fireworks Javascript Api

    CHAPTER 5 Fireworks JavaScript API This chapter lists JavaScript functions supported by Macromedia Fireworks MX 2004 that enable you to 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 104: Document Functions

    Palette or panel Several API functions reference the History panel (see “History panel functions” on page 278). Throughout the Fireworks documentation and online help, the term “palette” is reserved for discussions of a color palette, and the term “panel” is used to refer to the floating windows that are available within Fireworks.
  • Page 105 Example The following command adds a simple rollover behavior at the end of the selected slice or Hotspot. fw.getDocumentDOM().addBehavior("MM_simpleRollover()", "onMouseOver", -1); See also dom.removeBehavior() Using the dom.addBehavior() function The following code shows the syntax for dom.addBehavior() fw.getDocumentDOM().addBehavior(action, event, eventindex); The first argument is a string that specifies the behavior to be added; see “dom.addBehavior()”...
  • Page 106 MM_nbGroup [highlight] Availability Fireworks 3. Arguments type, target, swapFrame, fileName, preload, downHighlight, downHighlightFrame, downHighlightFilename • Pass "over" type • specifies the slice to which the behavior is attached. Pass for this value; all other target –1 values are used internally by Fireworks. •...
  • Page 107 Description Sets a navigation bar image behavior. Example fw.getDocumentDOM().addBehavior("MM_nbGroup(\'all\',1,0)", "onMouseOver", -1); MM_nbGroup [out] Availability Fireworks 3. Arguments type Pass "out" type Description Sets a navigation bar restore behavior. Example fw.getDocumentDOM().addBehavior("MM_nbGroup(\'out\')", "onMouseOut", -1); MM_simpleRollover Availability Fireworks 3. Arguments None. Description Adds a simple rollover behavior. Example fw.getDocumentDOM().addBehavior("MM_simpleRollover()", "onMouseOver", -1);...
  • Page 108 Example fw.getDocumentDOM().addBehavior("MM_statusMessage(\"Status Message!\")", "onMouseOver", -1); 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 target –1 values are used internally by Fireworks. • is an integer value that specifies the frame to swap, starting with (although, to use swapFrame...
  • Page 109 dom.addElementMask() Availability Fireworks 4. Usage dom.addElementMask(mode, {bEnterMaskEditMode} 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 "hide selection" selection, operate the same as "reveal selection"...
  • Page 110 Example The following command adds one frame after the current frame but does not change the active frame. fw.getDocumentDOM().addFrames(1, "after current", false); dom.addGuide() Availability Fireworks 3. 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 .
  • Page 111 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, bottom:100}); dom.addNewImage() Availability Fireworks 3. Usage dom.AddNewImage(boundRectangle, bEnterPaintMode) Arguments A rectangle that specifies the bounds of the image to be added (see boundingRectangle “Rectangle data type”...
  • Page 112 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. dom.addNewImageViaCut() Availability Fireworks MX.
  • Page 113 dom.addNewLine() Availability Fireworks 3. Usage dom.addNewLine(startPoint, endPoint) Arguments Points that specify the x,y coordinates between which the path is startPoint endPoint added (see “Point data type” on page 11). Returns Nothing. Description Adds a new path between two points. The new path uses the document’s current default path attributes and is added to the current frame and layer.
  • Page 114 dom.addNewRectangle() Availability Fireworks 3. Usage dom.addNewRectangle(boundingRectangle, roundness) Arguments A rectangle that specifies the bounds within which the new rectangle is boundingRectangle added (see “Rectangle data type” on page 11). A floating-point value between 0 and 1 that specifies the “roundness” to use for the roundness corners (0 is no roundness, 1 is 100% roundness).
  • Page 115 Description Adds a new rectangle primitive that fits in the specified bounds. The rectangle primitive uses the document’s current default path attributes, is added on the current frame and layer, and has several editable properties, such as corner roundness and transformation. The difference between a rectangle and a rectangle primitive is that a rectangle is a path that is shaped like a rectangle, and a rectangle primitive preserves its rectangular quality;...
  • Page 116 dom.addNewStar() Availability Fireworks 3 Usage dom.AddNewStar(numSides, spikiness, bIsStar, centerPoint, outsidePoint) Arguments An integer that specifies the number of sides of the new path. numSides A floating-point value that controls the regularity of the star or polygon. Pass spikiness have Fireworks calculate a good value, or pass a value between 0 and 1 for manual control. , a star with the specified number of points is created.
  • Page 117 Description Adds a new symbol to the library and opens the symbol document for editing. Optionally adds an instance of the symbol to the document. Example The following command adds a new graphic symbol called to the library and places an text instance of it in the document.
  • Page 118 Returns if the swap image behavior was added; if no suitable Hotspot was at the true false specified location. Description If a single Hotspot or slice is selected, this function adds to it a swap image behavior from the Hotspot or slice located at in the document.
  • Page 119 Description Increases (positive values) or decreases (negative values) the font size of selected text elements. If a text element has multiple font sizes, each size is adjusted independently. dom.align() Availability Fireworks 3. Usage dom.align(alignmode) Arguments Acceptable values are alignmode "left" "right"...
  • Page 120 dom.appendPointToPath() Availability Fireworks 3. Usage dom.appendPointtoPath(ontourIndex, ptToInsertBefore, controlPointFirst, mainPoint, controlPointLast) Arguments An zero-based index value that specifies the contour to which the Bézier point is contourIndex appended. For paths with multiple contours, the contours are in an arbitrary order. A zero-based index value that specifies where on the path the new point ptToInsertBefore should be placed.
  • Page 121 Description Appends a point to the selected unclosed polygon slice. If an unclosed polygon slice is not selected, then a new polygon slice is created with the single point that passed in. dom.applyCharacterMarkup() Availability Fireworks 3, enhanced in 4. Usage dom.applyCharacterMarkup(tag) Arguments Acceptable values for...
  • Page 122 dom.applyEffects() Availability Fireworks 3. Usage dom.ApplyEffects(effectList) Arguments An EffectList object (see “EffectList object” on page 38). If effectList effectList null this function removes all effects from the selection. Returns Nothing. Description Applies the specified effects to the selection. Example The following command applies a drop shadow with an angle of 315, a blur of 4, a color of black, and a distance of 7 (see “Drop Shadow object”...
  • Page 123 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 styleIndex styles with the same name, is used to resolve the ambiguity (0 references the first styleIndex style with that name, 1 references the second, and so on).
  • Page 124 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. Example When two items are selected (one a text block and the other a shape), the following command attaches the text block to the shape’s path.
  • Page 125 dom.changeSliceGuide() Availability Fireworks MX. Usage dom.changeSliceGuide(currentPosition, newPosition, guidekind, isMagneticDrag) Arguments A floating-point value that specifies the current position of the slice guide to currentPosition be moved. A floating-point value that specifies the new position of the slice guide. newPosition Acceptable values are .
  • Page 126 Returns Nothing. Description Clears the “Selective JPEG mask” for the document. dom.clipCopy() Availability Fireworks 3. Usage dom.clipCopy() Arguments None. Returns Nothing. Description Copies the selection to the Clipboard. Example The following command copies the selected items to the Clipboard. fw.getDocumentDOM().clipCopy(); dom.clipCopyAsPaths() Availability Fireworks MX.
  • Page 127 dom.clipCopyFormats() Availability Fireworks MX. Usage dom.clipCopyFormats(format) Arguments The graphics format for the selection. For example, is the Adobe format "AICB" Illustrator format. Returns Nothing. Description Copies the selection to the Clipboard using the specified format. dom.clipCut() Availability Fireworks 3. Usage dom.clipCut() Arguments None.
  • Page 128 Arguments An optional string that specifies how resampling should be whatIfResolutionDifferent done if the resolution of the Clipboard contents doesn’t match the resolution of the document. Acceptable values for , and whatIfResolutionDifferent "resample" "do not resample" (displays a dialog box to let the user decide). If "ask user"...
  • Page 129 Returns Nothing. 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. An exception is also thrown if there is nothing on the Clipboard.
  • Page 130 Description Pastes the specified color channel on the Clipboard into each of the RGB channels of a new image or into the specified channel of the selected image, if any. Example The following command copies the red data from the Clipboard into the red channel: fw.getDocumentDOM().clipPasteFromChannelToChannel("red", "red");...
  • Page 131 dom.cloneSelection() Availability Fireworks 3. Usage dom.cloneSelection() Arguments None. Returns Nothing. 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();...
  • Page 132 dom.convertAnimSymbolToGraphicSymbol() Availability Fireworks 4. Usage dom.converAnimSymbolToGraphicSymbol() Arguments None. Returns Nothing. Description If a single animation symbol is selected, this function converts it from an animation symbol to a graphics symbol. See also dom.convertToAnimSymbol(), dom.convertToSymbol() dom.convertToAnimSymbol() Availability Fireworks 4. Usage dom.convetToAnimSymbol(name, numFrames, offsetDistPt, rotationAmount, scaleAmount, startOpacity, endOpacity) Arguments A string that specifies a name for the new animation symbol.
  • Page 133 Description Converts the selected item(s) to a new animation symbol. See also dom.convertAnimSymbolToGraphicSymbol(), dom.convertToSymbol(), dom.setAnimInstanceNumFrames() dom.convertToPaths() Availability Fireworks 3. Usage dom.convertToPaths() Arguments None. Returns Nothing. Description Converts the selected text items into editable paths. Example The following command converts the selected text items into editable paths. fw.getDocumentDOM().convertToPaths();...
  • Page 134 Example The following command creates a graphic symbol from the selected item and names it “star”. fw.getDocumentDOM().convertToSymbol("graphic", "star"); See also dom.convertToAnimSymbol(), dom.convertAnimSymbolToGraphicSymbol() dom.convolveSelection() Availability Fireworks MX 2004. Usage dom.convolveSelection( kernelWidth, kernelHeight, kernelValues, affectsAlpha) Arguments An integer that defines the width of the filter coefficients. kernelWidth An integer that that defines the height of the filter coefficients.
  • Page 135 Arguments None. Returns Nothing. Description Opens the Copy HTML Wizard dialog box. Example The following command opens the Copy HTML Wizard dialog box: fw.getDocumentDOM().copyHtmlWizard(); dom.copyToHotspot() Availability Fireworks 3. Usage dom.copyToHotspot(hotspotType, {whatIfMultipleSelected}) Arguments Acceptable values are hotspotType "hotspot" "slice" An optional string that specifies how to create Hotspots if multiple whatIfMultipleSelected items are selected.
  • Page 136 Arguments A rectangle that specifies the bounds within which the selection should be boundingRectangle cropped (see “Rectangle data type” on page 11). Returns Nothing. Description Crops the selection to the specified rectangle. dom.deleteAllInDocument() Availability Fireworks MX. Usage dom.deleteAllInDocument() Arguments None. Returns Nothing.
  • Page 137 dom.deleteLayer() Availability Fireworks 3. Usage dom.deleteLayer(layerIndex) Arguments An integer value that specifies the the layer to be deleted, starting with layerIndex (although, to specify the current layer, pass here). –1 Returns Nothing. Description Deletes a layer. Example The following command deletes the current layer. fw.getDocumentDOM().deleteLayer(-1);...
  • Page 138 dom.deleteSelection() Availability Fireworks 3. Usage dom.deleteSelection(bFillDeletedArea) Arguments This argument is ignored if Fireworks is not in bitmap mode. If Fireworks bFillDeletedArea is in bitmap mode and , the deleted pixels are filled with the current bFillDeletedArea true fill color. If , the deleted pixels are filled to transparent.
  • Page 139 Example The following command deletes the selected symbols from the library as well as any active instances from the document. fw.getDocumentDOM().deleteSymbol(null); dom.detachInstanceFromSymbol() Availability Fireworks 3. Usage dom.detachInstanceFromSymbol() Arguments None. Description Breaks the links between the selected instances and the owning symbols. Returns Nothing.
  • Page 140 Returns Nothing. Description Distributes the selection along a vertical or horizontal dimension. dom.distributeLayerToFrames() Availability Fireworks 3. Usage dom.distributeLayerToFrames(layerIndex) Arguments An integer value that specifies the layer that contains the items to be distributed, layerIndex starting with (although, to specify the current layer, pass here).
  • Page 141 dom.dragControlPoint() Availability Fireworks MX 2004. Usage dom.dragControlPoint(index, newLoc, shiftKeyDown, ctrlCmdKeyDown, altOptKeyDown) Arguments The index of the control point to move. index Specifies the new location of the point. newLoc Specifies whether the Shift key is pressed. shiftKeyDown Specifies whether the Ctrl key (Windows) or Command key (Macintosh) ctrlCmdKeyDown is pressed.
  • Page 142 Example The following command makes one copy of the current frame and places the new frame after the current frame. fw.getDocumentDOM().duplicateFrame(-1, 1, "after current", false); dom.duplicateLayer() Availability Fireworks 3. Usage dom.duplicateLayer(layerIndex, {howMany}, {where}) Arguments} An integer value that specifies the layer to duplicate, starting with (although, to layerIndex specify the current layer, pass...
  • Page 143 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 Integer values that specify the range of frames frameIndexFirst frameIndexLast (inclusive) to which the items should be copied, starting with...
  • Page 144 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. null • Duplicating a linked symbol results in a nonlinked duplicate. Returns Nothing. Description Duplicates the specified symbol.
  • Page 145 Arguments Specifies which rectangle to check for elements. To find the elements under a single where point (similar to 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 146 Arguments A Boolean value to turn anti-aliasing on ( ) or off antiAlias true (false Returns Nothing. Description Turns anti-aliasing on or off for the selected blocks of text. dom.enterElementMaskEditMode() Availability Fireworks 4. Usage dom.enterElementMaskEditMode() Arguments None. Returns Nothing. Description Places Fireworks in element-mask edit mode for the selection.
  • Page 147 dom.exitElementMaskEditMode() Availability Fireworks 4. Usage dom.exitElementMaskEditMode() Arguments None. Returns Nothing. Description Takes Fireworks out of element-mask edit mode. If Fireworks is not in this mode, this function has no effect. dom.exitPaintMode() Availability Fireworks 3. Usage dom.exitPaintMode() Arguments None. Returns Nothing. Description Leaves bitmap mode.
  • Page 148 Returns if the file is read successfully; if the file is not the expected format or is not read true false successfully for any other reason. Description Replaces the values in with those in the specified GIF or dom.exportOptions.paletteEntries ACT file. This function also sets .
  • Page 149 Returns if the file is successfully exported; otherwise. true false Description Exports the document as specified. dom.fillSelectedPixels() Availability Fireworks 3. Usage dom.fillSelectedPixels(clickPt, p1, p2, p3, bFillSelectionOnly, tolerance, edgemode, featherAmt) Arguments A point that specifies the x,y coordinates of the pixel to be filled or generated (see clickPt “Point data type”...
  • Page 150 dom.filterSelection() Availability Fireworks 3. usage dom.filterSelection(LiveEffect) Arguments An Effect object (see “Effect object” on page 32). 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. Only external filters that are capable of also being Live Effects can be applied using this function.
  • Page 151 dom.findExportFormatOptionsByName() Availability Fireworks 3. Usage dom.findExportFormatOptionsByName(name) Arguments A string that specifies the name of the set of export settings to find. name Returns If there is a set of export settings with the specified name, the argument returns an object that represents it;...
  • Page 152 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. Description Flattens the selection into a single pixel image. This action is the same behavior as the Merge Images command.
  • Page 153 dom.getPixelMask() Availability Fireworks 3, deprecated in 4. Usage dom.getPixelMask() Arguments None. Returns The mask for the current pixel selection. Returns if Fireworks is not in bitmap mode, or if null there is no pixel selection. For information on the format of mask variables, see “Mask data type”...
  • Page 154 Returns if the grid is visible; otherwise. true false Description Determines whether the grid is visible. dom.getShowRulers() Availability Fireworks 3. Usage dom.getShowRulers() Arguments None. Returns if the rulers are visible; otherwise. true false Description Determines whether the rulers are visible. dom.getSnapToGrid() Availability Fireworks 3.
  • Page 155 Arguments None. Returns One of the following strings: "left" "center" "right" "justify" "stretch" "vertical , or left" "vertical center" "vertical right" "vertical justify" "vertical . Returns if the text has multiple alignments or if the selection contains no text. stretch" null Description Gets the alignment of selected text.
  • Page 156 Returns if the text has the specified character markup; if it does not or if only part of the text true false has the markup. Description Determines whether the selected text has the specified character markup. dom.hideSelection() Availability Fireworks 3. Usage dom.hideSelection() Arguments...
  • Page 157 Example The following command imports the specified file and maintains its aspect ratio. fw.getDocumentDOM().importFile("file:///C|/images/foo.psd", {left:25, top:50, right:100, bottom:250}, true); dom.importSymbol() Availability Fireworks 3. Usage dom.importSymbol(fileURL, bAddToDoc, bAllowUI) Arguments The name of the file to be imported into the library, which is expressed as a file:// fileURL URL.
  • Page 158 Description xtracts the component elements from the selected symbol and places copies of those elements in the document. This function is similar to the API. places an instance of dom.importSymbol dom.importSymbol a symbol in your document—for example, when you select Edit > Libraries > Buttons, and extracts the component elements from the selected symbol dom.importSymbolButNotAsAlias and places copies of those elements in the document.
  • Page 159 Returns Nothing. Description Inserts a Bézier point in the selected path. This function is similar to dom.appendPointToPath() but includes a argument, which lets you control where the point is inserted. tParameter See also dom.appendPointToPath() dom.insertSmartShapeAt() Availability Fireworks MX 2004. Usage dom.insertSmartShapeAt(name, location, useToolBlendModeOpacity) Arguments A string specifying the name of the Auto Shape.
  • Page 160 Description Tests to see if the selected object(s) are directly above a bitmap object. The selection does not need to be contiguous, although at least one item in the selection must be directly above a bitmap. dom.joinPaths() Availability Fireworks 3. Usage dom.joinPaths() Arguments...
  • Page 161 dom.knifeElementsFromPoints() Availability Fireworks 3. Usage dom.knifeElementsFromPoints(from, to, tolerance) Arguments A point that specifies the x,y coordinates of the point where the user clicked and started to from drag (see “Point data type” on page 11). A point that specifies the x,y coordinates of the point where the user ended the drag operation.
  • Page 162 Description Links or unlinks the element mask on the selected element. If more than one element (or no elements) are selected when this function is called, Fireworks throws an exception. An exception is also thrown if the element has no element mask. dom.makeFind() Availability Fireworks 3.
  • Page 163 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 164 Points that specify the x,y , and controlPointFirst, mainPoint controlPointLast coordinates of the preceding control point, the main point, and the following control point of the new point (see “Point data type” on page 11). , the path has the document’s current fill, stroke, and dReapplyAttrs dReapplyAttrs true...
  • Page 165 Arguments A zero-based index that specifies an index into the list of selected items, indicating whichPath which item contains the Bézier handles to move. A zero-based index that specifies the contour that contains the handles to move. contourIndex For paths with multiple contours, the contours are in an arbitrary order. A zero-based index that specifies the point whose handles are moved.
  • Page 166 Arguments A point that specifies the x,y coordinate values by which the handle is moved (see “Point delta data type” on page 11). For example, passing specifies a location that is right by 1 pixel and down by 2 pixels. Specifies which handle to move and can be one of the following values: whichHandle "start"...
  • Page 167 dom.movePixelMaskBy() Availability Fireworks 4. Usage dom.movePixelMaskBy(delta) Arguments A point that specifies the x,y coordinate values by which the bitmap mode selection is delta moved (see “Point data type” on page 11). For example, passing ({ })moves the bitmap mode selection 1 pixel to the right and 2 pixels down. Returns Nothing.
  • Page 168 dom.movePointOnHotspotByWithFlags() Availability Fireworks MX. Usage dom.MovePointOnHotspotByWithFlags(ptToModifyIndex, delta, flags) Arguments A zero-based index that specifies which point on the path is to move. ptToModifyIndex A point that specifies the x-,y-coordinate values by which the point is moved (see “Point delta data type” on page 11).
  • Page 169 dom.moveSelectionBy() Availability Fireworks 3. Usage dom.moveSelectionBy(delta, bMakeCopy, doSubSel) Arguments A point that specifies the x,y coordinate values by which the selection moved (see “Point delta data type” on page 11). For example, passing moves the selection one pixel to the right and two pixels down.
  • Page 170 dom.moveSelectionTo() Availability Fireworks 3. Usage dom.moveSelectionTo(location, bMakeCopy, doSubSel) Arguments A point that specifies the x-,y-coordinate values of the location to which the selection location is moved or copied (see “Point data type” on page 11). Specifies copying instead of moving the selection. bMakeCopy is set to , the function moves only the subselected parts of a path.
  • Page 171 dom.moveSelectionToLayer() Availability Fireworks 3, enhanced in 4. Usage dom.moveSelectionToLayer(layerIndex, bMakeCopy, {whatIfMultipleSelected}, {elementIndex}) Arguments An integer value that specifies the layer to which the selection should be moved or layerIndex copied, starting with 0 (although, to specify the current layer, pass –1 here). , the selection is copied instead of moved.
  • Page 172 dom.pathCrop() Availability Fireworks 3. Usage dom.pathCrop() Arguments None. Returns Nothing. Description Performs a crop operation on the selected paths. dom.pathExpand() Availability Fireworks 3. Usage dom.pathExpand(width, miter, cap, join) Arguments 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.
  • Page 173 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. miter This argument is ignored if the value of is not join "miter"...
  • Page 174 dom.pathSimplify() Availability Fireworks 3. Usage dom.pathSimplify(limit) Arguments is a floating-point value that specifies how much to simplify. This value corresponds to the limit value in the Modify > Alter Path > Simplify dialog box. Returns Nothing. Description Performs a simplify operation on the selected paths. dom.pathUnion() Availability Fireworks 3.
  • Page 175 Description Previews the document in the primary or secondary browser. dom.rebuildColorTable() Availability Fireworks 3. Usage dom.rebuildColorTable() Arguments None. Returns Nothing. Description Rebuilds the color table for the current export settings of the document. This is the same behavior as choosing Rebuild Color Table from the Color Table panel. dom.redo() Availability Fireworks 3.
  • Page 176 Returns Nothing. Description Forces the document to redraw itself immediately. This function is useful for providing feedback during complicated commands. dom.reflectSelection() Availability Fireworks 3. Usage dom.reflectSelection(bHoriz, bVert, opts) Arguments , the items are reflected horizontally. bHoriz bHoriz true , the items are reflected vertically. bVert bVert true...
  • Page 177 dom.removeBehavior() Availability Fireworks 3. Usage dom.removeBehavior({event}, {eventIndex}) Arguments An optional argument specifying the event that triggers the behavior. This argument is event ignored by Fireworks. An integer value that specifies the location of the behavior to be removed, starting eventIndex with 0 (although, to specify the end location, pass –1 here).
  • Page 178 dom.removeCharacterMarkup() Availability Fireworks 3. Usage dom.removeCharacterMarkup(tag) 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 179 Returns Nothing. Description Reapplies the default value for the specified font attribute to the text in the selection. 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...
  • Page 180 dom.removeTransformation() Availability Fireworks 3. Usage dom.removeTransformation() Arguments None. Returns Nothing. Description Removes the transformations, if any, from the selected text or instances. dom.reorderFrame() Availability Fireworks 3. Usage dom.reorderFrame(frameToMove, frameToPutItBefore, bMakeCopy) Arguments A zero-based index that specifies which frame to move or copy. frameToMove A zero-based index that specifies where to place the frame that is to be frameToPutItBefore...
  • Page 181 dom.reorderLayer() Availability Fireworks 3. Usage dom.reorderLayer(layerToMove, layerToPutItBefore, bMakeCopy) 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 layerToPutItBefore copied. For example, if you pass , the second layerToMove layerToPutItBefore...
  • Page 182 dom.replaceButtonTextStringsInInstances() Availability Fireworks 3. Usage dom.replaceButtonTextStringsInInstances(newString, uniformAttrs) Arguments Specifies the string to be used as replacement text. newString , each character retains the attributes of the character uniformAttrs uniformAttrs false that was formerly in its position; that is, Fireworks preserves the existing formatting. If , all characters assume the attributes of the first character in the string that uniformAttrs true...
  • Page 183 dom.resizeSelection() Availability Fireworks 3. Usage dom.resizeSelection(width, height) Arguments Integers that specify the new width and height, in pixels. width height Returns Nothing. 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.
  • Page 184 Returns Nothing. Description Restores the selection that is specified in dom.saveSelection(). See also dom.saveSelection() 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 185 dom.rotateSelection() Availability Fireworks 3. Usage dom.rotateSelection(rotationDegrees, opts) Arguments A floating-point value that specifies the number of degrees to rotate rotationDegrees the selection. Acceptable values are , and opts "transformAttributes" "autoTrimImages" " ". autoTrimImages transformAttributes Returns Nothing. Description Rotates the selection clockwise by the specified number of degrees. Rotating 270º is the same behavior as rotating 90º...
  • Page 186 dom.saveCopyAs() Availability Fireworks 3. Usage dom.saveCopyAs(fileURL) Arguments A string, which is expressed as a file://URL, that specifies the directory and name fileURL under which the copy should be saved. Returns if the save operation is successful; otherwise. true false Description Saves a copy of the document in a specified directory with a specified name.
  • Page 187 Returns Nothing. Description Stores the current selection in bitmap mode as the saved selection. Use to restore the selection. dom.restoreSelection() See also dom.restoreSelection() dom.scaleSelection() Availability Fireworks 3. Usage dom.scaleSelection(xScaleAmount, yScaleAmount, opts) Arguments Float values that specify the amount to scale the selection in xScaleAmount yScaleAmount the horizontal and vertical axes.
  • Page 188 Arguments Acceptable values are , and whatToDo "expand" "contract" "border" "smooth" • to expand the pixel selection outward by the number of pixels that are specified "expand" amount • to reduce the pixel selection inward by the number of pixels that are specified "contract"...
  • Page 189 Returns Nothing. Description Selects all the items on the given layer in the current frame. This function deselects objects on other layers. If the only element on the layer is a bitmap, Fireworks will enter paint mode on the bitmap. dom.selectChildren() Availability Fireworks 3.
  • Page 190 dom.selectInverse() Availability Fireworks 3. Usage dom.selectInverse() Arguments None. Returns Nothing. Description If Fireworks is in bitmap mode and a pixel selection is active, this function inverts the pixel selection. dom.selectNone() Availability Fireworks 3. Usage dom.selectNone() Arguments None. Returns Nothing. Description Deselects any selected items.
  • Page 191 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() dom.selectSimilar() Availability Fireworks 3. Usage dom.selectSimilar(tolerance, edgemode, featherAmt, combinemode) Arguments An integer between 0 and 255, inclusive, that specifies the tolerance for tolerance...
  • Page 192 Arguments A point that specifies the x,y coordinates of the pixel whose color is used to calculate the where new mask (see “Point data type” on page 11). An integer between 0 and 255, inclusive, that specifies the tolerance for tolerance selecting pixels.
  • Page 193 dom.setAllLayersDisclosure() Availability Fireworks 4. Usage dom.setAllLayersDisclosure(bDisclosed) Arguments , all the elements on all layers appear in the Layers list. If bDisclosed bDisclosed true , only layer names appear on the list. false Returns Nothing. Description Specifies whether all the elements in all layers appear in the Layers list. See also dom.setLayerDisclosure() dom.setAnimInstanceLoopCount()
  • Page 194 Returns Nothing. Description Sets the number of frames to animate the currently selected animation element. See also dom.convertToAnimSymbol() dom.setAnimInstanceOffsetDist() Availability Fireworks 4. Usage dom.setAnimInstanceOffsetDist(offsetDistPt) Arguments A point that specifies the distance the animation moves in pixels. For example, offsetDistPt passing ({ }) animates the symbol to the right by 100 pixels and down by 25 pixels.
  • Page 195 Description Sets the rotation amount, in degrees, to animate the currently selected animation element. 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 scaleAmount to the animation 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 196 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 startFrame panel when a multiframe image instance is selected.
  • Page 197 Returns Nothing. 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 11). color Returns Nothing. Description Sets the brush color of the selection to the specified color. See also dom.setBrushNColorNTexture() dom.setBrushName()
  • Page 198 dom.setBrushNColorNTexture() Availability Fireworks 3. Usage dom.setBrushNColorNTexture(brush, color, texture-name) Arguments A Brush object (see “Brush object” on page 26). brush A color string (see “Color string data type” on page 11). color The name of the texture to be applied. texture-name Returns Nothing.
  • Page 199 Arguments , automatic slicing is turned on. If , it is bAutoSlice bAutoSlice true bAutoSlice false turned off. Returns Nothing. Description If the user is editing a Button document, this function turns automatic slicing on or off. dom.setButtonIncludeDownState() Availability Fireworks 3. Usage dom.setButtonIncludeDownState(bIncludeDownState) Arguments...
  • Page 200 dom.setButtonShowDownOnLoad() Availability Fireworks 3. Usage dom.setButtonShowDownOnLoad(bShowDownOnLoad) Arguments , the Down-State-on-Load is shown in the bShowDownOnLoad bShowDownOnLoad true button. If , it is not. bShowDownOnLoad false Returns Nothing. Description If the user edits a Button document, this function specifies whether to show the Down-State-on- Load in a button.
  • Page 201 dom.setDefaultBrushAndFillColors() Availability Fireworks 3. Usage dom.setDefaultBrushAndFillColors() Arguments None. Returns Nothing. Description Resets the document’s brush and fill color to the default. dom.setDefaultFillVector() Availability Fireworks 3. Usage dom.setDefaultFillVector() Arguments None. Returns Nothing. Description Sets the fill-vector on the selection to the default. dom.setDocumentCanvasColor() Availability Fireworks 3.
  • Page 202 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"); dom.setDocumentCanvasSize() Availability Fireworks 3. Usage dom.setDocumentCanvasSize(boundingRectangle) Arguments A rectangle that specifies the new canvas size for the document, in pixels boundingRectangle (see “Rectangle data type”...
  • Page 203 Example The following command resizes the canvas to include all the items in the document, enlarging the canvas if necessary. fw.getDocumentDOM().setDocumentCanvasSizeToDocumentExtents(true); See also dom.setDocumentCanvasSizeToSelection() dom.setDocumentCanvasSizeToSelection() Availability Fireworks 3. Usage dom.setDocumentCanvasSizeToSelection() Arguments None. Returns Nothing. Description Calculates the size of all the items in the selection and resizes the document canvas accordingly. See also dom.setDocumentCanvasSizeToDocumentExtents() dom.setDocumentImageSize()
  • Page 204 dom.setDocumentResolution() Availability Fireworks 3. Usage dom.setDocumentResolution(resolution) Arguments Specifies the resolution for the document (see “Resolution data type” on page 12). resolution Returns Nothing. Description Sets the resolution of the document. dom.setEffectName() Availability Fireworks MX. Usage dom.setEffectName(category, oldName, newName) Arguments A string that defines the name of the category of the effect. category The existing name of the effect.
  • Page 205 Returns Nothing. Description Sets the rendering mode on the selected element’s element mask. Only one element can be selected when calling this function. If more than one element (or no elements) are selected when this function is called, Fireworks throws an exception. Fireworks also returns an error if the selected element has no element mask.
  • Page 206 dom.setElementVisible() Availability Fireworks 4. Usage dom.setElementVisisble(frameIndex, layerIndex, elementIndex, bShow) Arguments An integer value that specifies the frame that contains the element(s) to be shown frameIndex or hidden, starting with (although, to specify the current frame, pass here). –1 An integer value that specifies the layer that contains the element(s) to be shown or layerIndex hidden, starting with (although, to specify the current layer, pass...
  • Page 207 Description Shows or hides all the elements with the specified name. If no element has the specified name, an exception is thrown. If the elements are hidden because they are on a hidden layer or frame, for example, this function does not show them. See also dom.findNamedElements(), dom.setElementName(), dom.setElementVisible()
  • Page 208 Arguments A Fill object (see “Fill object” on page 51). fill Returns Nothing. Description Sets the selection to the specified fill. dom.setFillColor() Availability Fireworks 3. Usage dom.setFillColor(color) Arguments A color string (see “Color string data type” on page 11). color Returns Nothing.
  • Page 209 dom.setFillNColor() Availability Fireworks MX. Usage dom.setFillNColor(fill, color) Arguments A Fill object (see “Fill object” on page 51). fill A color string (see “Color string data type” on page 11). color Returns Nothing. Description Sets the selection to the specified fill and fill color. dom.setFillNColorNTexture() Availability Fireworks 3.
  • Page 210 dom.setFillPlacement() Availability Fireworks 3. Usage dom.setFillPlacement(placement) Arguments Acceptable values are placement "top" "bottom" Returns Nothing. Description Sets the fill placement for selected items with fills. dom.setFillVector() Availability Fireworks 3. Usage dom.setFillVector(p1, p2, p3) Arguments , and Points that specify the x,y coordinates of the three points used to calculate the fill vector (see “Point data type”...
  • Page 211 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. dom.setGradientName() Availability Fireworks 3. Usage dom.setGradientName(urrentName, newName) Arguments A string that specifies the current name of the gradient. currentName A string that specifies the new name of the gradient.
  • Page 212 Arguments A point that specifies the x,y coordinates that are used for the document’s grid size gridSize (see “Point data type” on page 11). Returns Nothing. Description Sets the grid size for the document. dom.setGridColor() Availability Fireworks 3. Usage dom.setGridColor(gridColor) Arguments A color string (see “Color string data type”...
  • Page 213 dom.setGuideColor() Availability Fireworks 3. Usage dom.setGuideColor(guideColor) Arguments A color string (see “Color string data type” on page 11). guideColor Returns Nothing. Description Sets the color that is used to display normal (nonslice) guides. To set the color of slice guides, use dom.setSliceGuideColor().
  • Page 214 dom.setHotspotColor() Availability Fireworks 3. Usage dom.setHotSpotColor(whatToSet, color) Arguments Acceptable values are , and whatToSet "hotspots" "slices" "hotspots and slices" A color string (see “Color string data type” on page color Returns Nothing. Description Sets the color to the specified value for the Hotspots and slices in the selection. Example The following command sets the color of the selected Hotspots to red.
  • Page 215 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. dom.setHotspotTarget() Availability Fireworks 3.
  • Page 216 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. textString A string that specifies a URL that is already assigned to one or more Hotspots in urlToMatch...
  • Page 217 Description Specifies whether the elements on a specified layer appear in the Layers list. Disclosure affects the layer, regardless of which frame appears. 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 layerIndex (although, to specify the current layer, pass here).
  • Page 218 Returns Nothing. 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 layerIndex (although, to specify the current layer, pass here).
  • Page 219 Arguments An integer value that specifies the layer that should be shown or hidden, starting layerIndex with (although, to specify the current layer, pass here). To show or hide all the layers on a –1 frame, use the argument. bAllLayers An integer value that specifies the frame that contains the layer to be shown or frameIndex hidden, starting with...
  • Page 220 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 11). If mask , any existing pixel-selection mask is removed. mask null If there was previously a mask and the new mask is also not...
  • Page 221 dom.setOpacity() Availability Fireworks 3. Usage dom.setOpacity(opacity) Arguments A float variable between 0 and 100, inclusive. opacity Returns Nothing. Description Sets the opacity of the selection to the specified value. Example The following command sets the selected item to an opacity of 55%. fw.getDocumentDOM().setOpacity(55);...
  • Page 222 Example The following command performs the transform operation on the selection within the specified points: fw.getDocumentDOM().setQuadrangle({x:-0.300884962, y:0.207964599}, {x:1, y:0.207964599}, {x:1, y:0.792035401}, {x:-0.300884962, y:0.792035401}, "autoTrimImages transformAttributes"); dom.setRectRoundness() Availability Fireworks 4. Usage dom.setRectRoundness(roundness) Arguments A floating-point value between 0 and 1 that specifies the roundness to use for the roundness corners ( is no roundness,...
  • Page 223 dom.setSelectionBounds() Availability Fireworks 3. Usage dom.setSelectionBounds(boundingRectangle, opts) Arguments A rectangle that specifies the new location and size of the selection (see boundingRectangle “Rectangle data type” on page 11). Acceptable values are , and opts "transformAttributes" "autoTrimImages" "autoTrimImages transformAttributes" Returns Nothing. Description Moves and resizes the selection in a single operation.
  • Page 224 dom.setShowEdges() Availability Fireworks 3. Usage dom.setShowEdges(bShowEdges) Arguments , the Show Edges option is turned on. If bShowEdges bShowEdges true bShowEdges , the option is turned off. false Returns Nothing. Description Specifies whether the Show Edges option is on or off. dom.setShowGammaPreview() Availability Fireworks 3.
  • Page 225 Returns Nothing. Description Specifies whether the grid is visible. dom.setShowGuides() Availability Fireworks 3. Usage dom.setShowGuides(bShow) Arguments , the normal guides are visible. If , they are not visible. bShow bShow true bShow false Returns Nothing. Description Specifies whether normal guides are visible. dom.setShowRulers() Availability Fireworks 3.
  • Page 226 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. dom.setShowSliceOverlay() Availability Fireworks 3. Usage dom.setShowSliceOverlay(bShow) Arguments , the slice overlay is visible. If , it is not visible.
  • Page 227 dom.setSliceExportOptions() Availability Fireworks 3. Usage dom.setSliceExportOptions(exportOptions) Arguments An ExportOptions object (see “ExportOptions object” on page 46). exportOptions Returns Nothing. Description Sets the export options for the selected slices. dom.setSliceFilename() Availability Fireworks 3. Usage dom.setSliceFilename(fileURL) Arguments A string, which is expressed as a file://URL, that specifies the name to be given to fileURL the slice.
  • Page 228 Description Sets the color that is used to display slice guides. To set the color of normal guides, use dom.setGuideColor() See also dom.setGuideColor() dom.setSliceHtml() Availability Fireworks 3. Usage dom.setSliceHtml(htmlText) Arguments A string that specifies the HTML text for the slice. htmlText Returns Nothing.
  • Page 229 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. Usage dom.setSnapToGuides(bSnap) Arguments , the tools snap to all guides. If , they do not.
  • Page 230 dom.setTextAlignment() Availability Fireworks 3. Usage dom.setTextAlignment(alignment) Arguments Acceptable values alignment alignment "left" "center" "right" "justify" "stretch" "vertical left" "vertical center" "vertical right" "vertical , and justify" "vertical stretch" Returns Nothing. Description Sets the alignment of the selected text items. dom.setTextAntiAliasing() Availability Fireworks 3.
  • Page 231 Arguments , automatic kerning is on for the selected text items. If bKern bKern true bKern false it is off. Returns Nothing. Description Specifies whether automatic kerning is on or off for the selected text items. dom.setTextCharSpacing() Availability Fireworks MX. Usage dom.setTextCharSpacing(charSpace) Arguments...
  • Page 232 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. dom.setTextCustomAntiAliasStrength() Availability Fireworks MX 2004. Usage dom.setTextCustomAntiAliasStrength(strength) Arguments An integer value, from 0 to 255, for the amount of anti-aliasing to apply. Strength Returns Nothing.
  • Page 233 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 horizScale horizontally. A value of is normal. Values greater than make the characters wider, and values less than make the characters narrower.
  • Page 234 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) Arguments A floating-point value that specifies the offset distance, in pixels. offset Returns Nothing.
  • Page 235 Returns Nothing. 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. Description Sets the paragraph indention of text, in pixels. dom.setTextParaSpacingAfter() Availability Fireworks MX.
  • Page 236 dom.setTextParaSpacingBefore() Availability Fireworks MX. Usage dom.setTextParaSpacingBefore(paraSpaceBefore) Arguments The number of pixels to move down before starting a new paragraph. paraSpaceBefore 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.
  • Page 237 Arguments Acceptable values are mode "paths" "pixels" Returns Nothing. Description Sets the transform mode for the selected text, instance items, or both. dom.setTextRectangle() Availability Fireworks 3. Usage dom.setTextRectangle(boundingRectangle) Arguments A rectangle that specifies the new size within which the text item should boundingRectangle flow (see “Rectangle data type”...
  • Page 238 dom.setTextRectangleAutoFromPoint() Availability Fireworks 3. Usage dom.setTextRectangleAutoFromPoint(anchorPoint) Arguments A point that specifies the x,y coordinates of the location at which the text box anchorPoint should be anchored (see “Point data type” on page 11). How the point is used depends on the left-to-right and up-to-down orientation of the text flow in the text block.
  • Page 239 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 240 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. bDistribute bDistribute true Returns Nothing.
  • Page 241: Fireworks Functions

    dom.updateSymbol() Availability Fireworks 3. Usage dom.updateSymbol(name) Arguments The name of a symbol in the library. If more than one symbol exists with a name of name name then only the first symbol with that name is updated. If is passed in for , then all the null name...
  • Page 242 . The first two values display browseType "open" "select" "save" an Open dialog box; each is acceptable for compatibility with Macromedia Dreamweaver. The third value displays a Save dialog box. Ignored by Fireworks but are accepted for compatibility title previewArea with Dreamweaver.
  • Page 243 Arguments An optional string that specifies a title for the dialog box that appears. If it is omitted or title , a default title appears. null An optional string that serves as the root directory for the dialog box that startFolder appears.
  • Page 244 fw.chooseBrowser() Availability Fireworks MX. Usage fw.chooseBrowser(primaryBrowser) Arguments A Boolean value that indicates which browser to select. If primaryBrowser primaryBrowser , Fireworks prompts the user to set the primary browser; if the argument is , Fireworks true false prompts the user to set the secondary browser. Returns Nothing.
  • Page 245 fw.closeDocument() Availability Fireworks 3. Usage fw.closeDocument(document, {bPromptToSaveChanges}) Arguments A Document object that specifies the document to close (see “Document object” document on page 13). An optional Boolean argument. If bPromptToSaveChanges bPromptToSaveChanges true omitted and the document has changed since the last time it was saved, the user is prompted to save changes to the document.
  • Page 246 fw.createDocumentWithDialog() Availability Fireworks MX 2004. Usage fw.createDocumentWithDialog() Arguments None. Returns The Document object for the newly created document (see “Document object” on page 13). Description Shows the New Document dialog box and allows the user to create a new document. fw.createFireworksDocument() Availability Fireworks 3.
  • Page 247 fw.disableFlashDebugging() Availability Fireworks MX Usage fw.disableFlashDebugging() Arguments None. Returns Nothing. Description Turns off debugging messages for Flash commands. For a description of the Flash debugging capabilities, see on page 247. For more information about fw.enableFlashDebugging() constructing Flash command panels for Fireworks, see “Flash panels”...
  • Page 248 Arguments None. Returns Nothing. Description Turns on debugging messages for Flash commands. When Flash debugging is enabled, Fireworks displays the command string in a dialog box every time a Flash command calls . The MMExecute() function is particularly useful for monitoring which commands fw.enableFlashDebugging() are executed in a command panel.
  • Page 249 Export dialog box. Returns A Boolean value: if successful; otherwise. true false Description Exports the specified document to the specified file as Macromedia Director images. fw.exportDocumentAs() Availability Fireworks 3. Usage fw.exportDocumentAs(document, fileURL, exportOptions) Arguments A Document object, for example, , that specifies the document to document fw.documents[2]...
  • Page 250 Description Exports the specified document to the specified file. See also fw.exportHtmlAndImages() fw.exportFrames() Availability Fireworks 4. Usage fw.exportFrames(docObject, directoryURL) Arguments A Document object that specifies the document that contains the frames to export docObject (see “Document object” on page 13). To export frames from the current document, pass null The directory where the images will be placed, which is expressed as a file:// directoryURL...
  • Page 251 Returns A Boolean value: if successful; otherwise. true false Description Exports one image if the document contains no slice objects and multiple images if the document contains one or more slice objects. It also optionally exports HTML. The document is exported using the current export settings and export options.
  • Page 252 Arguments A Document object that specifies the document that contains the layers to export docObject (see “Document object” on page 13). To export layers from the current document, pass null The directory in which the images will be placed, which is expressed as a file:// directoryURL URL.
  • Page 253 A Document object that specifies the document to be exported (see “Document docObject object” on page 13). To export the current document, pass null The name of the Macromedia Flash document to be created, which is FlashDocumentURL expressed as a file://URL. Returns A Boolean value: if successful;...
  • Page 254 Example The Macromedia 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. var prevMaintainObjEditable = fw.getPref("SwfMaintainObjEditable"); fw.setPref("SwfMaintainObjEditable", true); // maintain non-text editability //at expense of appearance or not var prevMaintainTextEditable = fw.getPref("SwfMaintainTextEditable");...
  • Page 255 Description Attempts to find the path to the requested application. On the Macintosh, Fireworks looks for the application using a four-character signature code. In Windows, Fireworks looks in the Windows registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths See also fw.launchApp() fw.findNext() Availability Fireworks 3. Usage fw.findNext() Arguments...
  • Page 256 fw.getDocumentDOM() Availability Fireworks 3. Usage fw.getDocumentDOM({which-string}) Arguments An optional string that is included for compatibility with Dreamweaver. If which-string specified here, it must be "document" Returns The Document object for the active document, or if no document is open. null Description Gets the Document object for the active document (see “Document object”...
  • Page 257 Returns An array like the one in the following example: [ [ "stroke", "fill", "effect" ], [ "layers", "frames", "object" ], [ "mixer", "options", "swatches", "info" ], [ "styles", "library" ], [ "find", "project log" ], [ "url" ], [ "optimize", "optimized colors" ], [ "behaviors" ], [ "history"...
  • Page 258 Arguments Acceptable values are panelName "find" "project log" "object" "info" "url" "effect" "history" "mixer" "fill" "stroke" "swatches" "layers" "frames" , and "behaviors" "optimize" "library" "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 259 fw.getNumberOfTables() Availability Fireworks MX. Usage fw.getNumberOfTables(filename) Arguments The name of the file that contains the tables to be counted. filename Returns A long integer that represents the number of tables in the document. Description Returns the number of top-level (that is, non-nested) tables in a document. fw.getPref() Availability Fireworks 3.
  • Page 260 Arguments The URL to open in the primary web browser. Returns Nothing. Example The following command starts a browser that opens to the Macromedia website: fw.launchBrowserTo("http://www.macromedia.com"); Description Starts Fireworks’ primary web browser to open a URL. fw.locateDocDialog() Availability Fireworks 4.
  • Page 261 The following table lists acceptable values for and the file type each value represents. formatname Value File type Adobe Illustrator "ADOBE AI3" Fireworks JSF "Fireworks JavaScript" Bitmap "kMoaCfFormat_BMP" Macromedia FreeHand 7 or 8 "kMoaCfFormat_FreeHand7and8" "kMoaCfFormat_GIF" JPEG "kMoaCfFormat_JPEG" Macintosh PICT "kMoaCfFormat_PICT" Rich text "kMoaCfFormat_RTF" Plain text "kMoaCfFormat_Text"...
  • Page 262 Returns If any of the files can be opened, returns the Document object for each file. Returns if none null of the documents can be opened. Description Opens the specified files in new document windows. If a file is already open, it opens again; to avoid redundant open operations, call first.
  • Page 263 A Boolean value that lets the user select a transparent color; set to allowTransparent true transparent, otherwise. false A Boolean value that forces the chosen color to fall within the web216 panel; set forceWeb216 to force the color change, otherwise. true false Returns...
  • Page 264 fw.readNthTable() Availability Fireworks MX. Usage fw.readNthTable(filename, tablenumber) Arguments for the file that contains the desired table. filename fileURL A long integer that specifies the desired table; the tables are zero-indexed. tablenumber Returns A database that is constructed from the table data. Description Reads the specified table.
  • Page 265 Returns The number of items that are replaced, or if there are items in the document that remain to –1 be searched. Description Verifies that the selection matches the current search string and replaces it with the replacement string. See also fw.setUpFindReplace() fw.replaceAll() Availability...
  • Page 266 Returns Nothing. Description Restores the specified document to its previously saved version. fw.runScript() Availability Fireworks 3. Usage fw.runScript(filename) Arguments The name of the script file to execute. If is not a file URL (that is, if it filename filename does not begin with ), it is assumed to be the name of a file in the Fireworks MX/ "file:///"...
  • Page 267 fw.saveDocument() Availability Fireworks 3. Usage fw.saveDocument(document, {fileURL}) Arguments A Document object, for example, , that specifies the document to document fw.documents[2] be saved. If , the active document is saved. document null The name of the saved document, which is expressed as file://URL. This argument is fileURL optional.
  • Page 268 fw.saveDocumentCopyAs() Availability Fireworks 3. Usage fw.saveDocumentCopyAs(document, fileURL) Arguments A Document object, for example, , that specifies the document to document fw.documents[2] be saved. If , the active document is saved. document null The filename for the saved file, which is expressed as a file://URL. If fileURL fileURL null...
  • Page 269 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 scale is 6%. A point that defines the location in the document at which the view should be centered. center This argument can be used to navigate around different parts of the document.
  • Page 270 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 panelNameToReceive panel should move. If , the panelNameToMove panelNameToReceive null panelNameToMove panel moves into its own panel.
  • Page 271 Arguments Acceptable values are panelName "find" "project log" "object" "info" "url" "effect" "history" "mixer" "fill" "stroke" "swatches" "layers" "frames" "behaviors" "optimize" "library" "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 272 fw.setHideAllFloaters() Availability Fireworks 3. Usage fw.setHideAllFloaters(bHide) Arguments , the panels are hidden. If , the panels are visible. bHide bHide true bHide false Returns Nothing. Description Shows or hides the panels. This behavior is the same as the Tab key behavior. fw.setPref() Availability Fireworks 3.
  • Page 273 Returns Nothing. Description Sets up a search. fw.toggleFloater() Availability Fireworks 3. 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" "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 274 Description Replaces selected primitive objects with their equivalent paths. The new objects have all the attributes (mask, stroke, fill, and so on) of the replaced ones. See also dom.addNewRectanglePrimitive() fw.updateHTML() Availability Fireworks 4. Usage fw.updateHTML(doc, htmlUrl, bRecoverFromError) Arguments A Document object that specifies the document to be used for updating the HTML (see “Document object”...
  • Page 275: Property Inspector Functions

    Returns Nothing. Description Writes out the panel states (location, size, open or closed, and so on), toolbox state, and Property inspector state to an XML file that is specified by the argument. fw.yesNoDialog() Availability Fireworks MX. Usage fw.yesNoDialog(promptString) Arguments The prompt message that appears in the dialog box. promptString Returns A Boolean value:...
  • Page 276 Returns Nothing. Description Opens the Property inspector. fw.hidePIWindow() Availability Fireworks MX. Usage fw.hidPIWindow() Arguments None. Returns Nothing. 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...
  • Page 277 Arguments None. Returns A Boolean value: if visible; otherwise. true false Description Determines whether the Property inspector window is currently hidden or shown. fw.growPIWindow() Availability Fireworks MX. Usage fw.growPIWindow() Arguments None. Returns Nothing. Description Expands the Property inspector window. fw.shrinkPIWindow() Availability Fireworks MX.
  • Page 278: History Panel Functions

    fw.setPIPosition() Availability Fireworks MX. Usage fw.setPIPosition(pt) Arguments A point in screen coordinates. Returns Nothing. Description Moves the upper left corner of the Property inspector window to the specified location. fw.getPIPosition() Availability Fireworks MX. Usage fw.getPIPosition() Arguments None. Returns A point object that is formatted as y: float} (see “Point data type”...
  • Page 279 Arguments None. Returns Nothing. Description Clears the undo and redo stack. fw.historyPalette.copySteps() Availability Fireworks 3. Usage fw.historyPalette.copySteps(array of indexes) Arguments A zero-based array that specifies which steps from the History panel should array of indexes be copied. If it is , the currently selected steps are used.
  • Page 280 fw.historyPalette.getStepCount() Availability Fireworks 3. Usage fw.historyPalette.getStepCount() Arguments None. Returns The number of steps in the History panel (not a zero-based value). Description Gets the number of steps in the History panel. fw.historyPalette.getStepsAsJavaScript() Availability Fireworks 3. Usage fw.historyPalette.getStepsAsJavaScript(rray of indexes) Arguments A zero-based array that specifies which steps from the History panel should array of indexes be returned as JavaScript.
  • Page 281 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 . This string is designed to be used internally by fw.historyPalette.setUndoState() Fireworks only and might change format in the future. Do not try to parse this string or construct a custom string to pass to fw.historyPalette.setUndoState() See also...
  • Page 282 Arguments Indicates which steps from the History panel should be saved. For example, array of indexes to save the first, third, and sixth steps in the History panel, pass [ ]. If this argument is null the currently selected steps are used. An optional string that specifies a name for the JSF command file.
  • Page 283: Using The Common Api

    Using the common API You can use the common Macromedia 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 currently supported in Fireworks and app.methodName()
  • Page 284 Chapter 5: Fireworks JavaScript API...
  • Page 285: Index

    INDEX applyEffects() 122 applyFontMarkup() 122 ActionScript 90 applyStyle() 123 cross-product extensions 77 arguments, optional 10 addBehavior() 104, 105 arrange() 123 addElementMask() 109 attachTextToPath() 124 addFrames() 109 Auto Shapes 95 addGuide() 110 defining 95 addNewHotspot() 110 helper functions 96 addNewImage() 111, 112 icons 95 addNewImageViaCopy() 111 switch statement 100...
  • Page 286 clipCopyAsPaths() 126 deletePointOnPath() 137 clipCopyFormats() 127 deleteSelection() 138 clipCut() 127 deleteSymbol() 138 clipPaste() 127 deprecated functions or arguments clipPasteAsMask() 128 dom.clipPasteInside() 130 clipPasteAttributes() 129 dom.getPixelMask 153 clipPasteFromChannelToChannel() 129 dom.group() 155 clipPasteInside() 130 dom.setAnimInstanceStartFrame() 196 cloneSelection() 131 dom.setGroupType() 212 close() 131 dom.setPixelMask() 220 closeDocument() 245 mask to image 40...
  • Page 287 dom.applyFontMarkup() 122 dom.exitElementMaskEditMode() 147 dom.applyStyle() 123 dom.exitPaintMode() 147 dom.arrange() 123 dom.exportOptions.loadColorPalette() 147 dom.attachTextToPath() 124 dom.exportOptions.saveColorPalette() 148 dom.changeGuide() 124 dom.exportTo() 148 dom.changeSliceGuide() 125 dom.fillSelectedPixels() 149 dom.clearJPEGMask() 125 dom.filterSelection() 150 dom.clipCopy() 126 dom.filterSelectionByName() 150 dom.clipCopyAsPaths() 126 dom.findExportFormatOptionsByName() 151 dom.clipCopyFormats() 127 dom.findNamedElements() 151 dom.clipCut() 127 dom.flattenDocument() 151 dom.clipPaste() 127...
  • Page 288 dom.moveSelectionToFrame() 170 dom.sendEmail() 192 dom.moveSelectionToLayer() 171 dom.setAllLayersDisclosure() 193 dom.moveSelectionToNewLayer() 171 dom.setAnimInstanceLoopCount() 193 dom.pathCrop() 172 dom.setAnimInstanceNumFrames() 193 dom.pathExpand() 172 dom.setAnimInstanceOffsetDist() 194 dom.pathInset() 172 dom.setAnimInstanceRotationAmount() 194 dom.pathIntersect() 173 dom.setAnimInstanceScaleAmount() 195 dom.pathPunch() 173 dom.setAnimInstanceStartEndOpacity() 195 dom.pathSimplify() 174 dom.setAnimInstanceStartFrame() 196 dom.pathUnion() 174 dom.setBlendMode() 196 dom.previewInBrowser() 174 dom.setBrush() 196 dom.rebuildColorTable() 175...
  • Page 289 dom.setGuideColor() 213 dom.setTextParaIndent() 235 dom.setHotspotAltTag() 213 dom.setTextParaSpacingAfter() 235 dom.setHotspotColor() 214 dom.setTextParaSpacingBefore() 236 dom.setHotspotRectangle() 214 dom.setTextRectangle() 237 dom.setHotspotShape() 215 dom.setTextRectangleAuto() 237 dom.setHotspotTarget() 215 dom.setTextRectangleAutoFromPoint() 238 dom.setHotspotText() 215 dom.setTextRuns() 236 dom.setLayerDisclosure() 216 dom.setTransformMode() 236 dom.setLayerLocked() 217 dom.showAllHidden() 238 dom.setLayerName() 217 dom.splitPaths() 239 dom.setLayerSharing() 218 dom.swapBrushAndFillColors() 239 dom.setLayerVisible() 218...
  • Page 290 EGenericErrorOccurred 17 ExportPaletteInfo object 48 EGroupDepth 17 exportPSD() 252 EIllegalThreadAccess 17 ExportSettings object 49 EInternalError 17 exportSWF() 253 Element object 39 exportTo() 148 ElementMask object 45 elements, changing 10 elementsAt() 144 Files object 17 ELowOnMem 17 Fill object 51 enableElementMask() 145 fills, finding and replacing 21 enableFlashDebugging() 247 fillSelectedPixels() 149...
  • Page 291 fw and fireworks class names 241 fw.isPIExpanded() 276 fw.browseDocument() 242 fw.isPIVisible() 276 fw.browseForFileURL() 242 fw.launchApp() 259 fw.browseForFolderURL() 242 fw.launchBrowserTo() 260 fw.browseHelp() 243 fw.locateDocDialog() 260 fw.checkFwJsVersion() 243 fw.openDocument() 261 fw.chooseBrowser() 244 fw.popupColorPicker() 262 fw.chooseScriptTargetDialog() 244 fw.popupColorPickerOverMouse() 262 fw.closeDocument() 245 fw.quit() 263 fw.createDocument() 245 fw.quitApplication() 263 fw.createDocumentWithDialog() 246...
  • Page 292 getHideAllFloaters() 258 importSymbol() 157 getHTMLFileForScript() 258 importSymbolButNotAsAlias() 157 getNumberOfTables() 259 index arguments 103 getPIPosition() 278 inLaunchAndEdit() 158 getPixelMask() 153 Inner Shadow (Effect object) 36 getPref() 259 insertPointInPath() 158 getRootDirectory() 283 InsertSmartShapeAt 98 getSelection() 279 insertSmartShapeAt() 159 getSelectionBounds() 153 installing an extension 6 getShowGrid() 153 Instance object 41 getShowRulers() 154...
  • Page 293 mergeDown() 163 ElementMask 45 Metafile.htt 64 Errors 16 methods,global 12 exportDoc 66 MM_nbGroup ExportFrameInfo 45 (down) 105 ExportOptions 46 (highlight) 106 ExportPaletteInfo 48 (image) 106 ExportSettings 49 (out) 107 Files 17 MM_simpleRollover 107 Fill 51 MM_statusMessage 107 Find 20 MM_swapImage 108 Fireworks 22 MM_swapImgRestore 108 Frame 52...
  • Page 294 pathCrop() 172 removeElementMask() 178 pathExpand() 172 removeFill() 179 pathInset() 172 removeFontMarkup() 178 pathIntersect() 173 RemoveFromAutoReleasePool() 87 pathPunch() 173 removeGuide() 179 pathSimplify() 174 removeTransformation() 180 pathUnion() 174 reorderFrame() 180 Pattern object 55 reorderLayer() 181 Photoshop document, exporting as 252 replace() 264 pngText 16 replaceAll() 265 point 11...
  • Page 295 selectInverse() 190 setFillNColorNTexture() 209 selectNone() 190 setFillPlacement() 210 selectParents() 190 setFillVector() 210 selectSimilar() 191 setFillVectorStart() 210 selectSimilarFromPoint() 191 setFloaterGrouping() 270 sendEmail() 192 setFloaterPosition() 270 set 79 setFloaterVisibility() 271, 283 setActiveViewScale() 269 setGradientName() 211 setActiveWindow() 269 setGridColor() 212 setAllLayersDisclosure() 193 setGridOrigin() 211 setAnimInstanceLoopCount() 193 setGridSize() 211 setAnimInstanceNumFrames() 193...
  • Page 296 setSnapToGrid() 228 setSnapToGuides() 229 templates 64 setSymbolProperties() 229 Text object 43 setTextAlignment() 230 text, finding and replacing 20 setTextAntiAliasing() 230 TextAttrs object 62 setTextAutoKern() 230 TextRuns object 63 setTextCharSpacing() 231 Texture object 44 setTextCustomAntiAliasOverSample() 231 toggleFloater() 273, 283 setTextCustomAntiAliasSharpness() 232 transformSelection() 239 setTextCustomAntiAliasStrength() 232 tween() 240...

This manual is also suitable for:

Fireworks mx 2004

Table of Contents