Adobe 65011817 Extended User Guide

Adobe 65011817 - Fireworks CS4 - Mac Manual

Adobe 65011817 manual content summary:

  • Adobe 65011817 | Extended User Guide - Page 1
    Extending ADOBE® FIREWORKS® CS4
  • Adobe 65011817 | Extended User Guide - Page 2
    the user guide is governed by these terms. The best way to provide notice is to include the following link. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ Adobe, the Adobe logo, Adobe AIR, Dreamweaver, Fireworks, Flash, FreeHand, Illustrator, Photoshop, are
  • Adobe 65011817 | Extended User Guide - Page 3
    's new in Extending Fireworks CS4 2 Conventions used in this guide 5 Additional resources for extension writers 5 Chapter 2: The Fireworks Working with selected objects 9 Global methods ...13 Core objects ...16 Adobe AIR Extension 21 Chapter 3: The Document object Document object properties 27
  • Adobe 65011817 | Extended User Guide - Page 4
    ...279 Chapter 7: Cross-Product Extensions Cross-product architecture 281 Flash panels ...292 Chapter 8: Auto Shapes How Auto Shapes work symbols How Rich symbols work 304 MXML Export ...309 Chapter 10: Additional Fireworks Functions Property inspector functions 315 History panel functions
  • Adobe 65011817 | Extended User Guide - Page 5
    must be written in JavaScript, this guide assumes that readers are familiar with JavaScript syntax and with Download and install the Adobe® Extension Manager, which is available on the Adobe Downloads website (www.adobe.com/exchange/em_download/). 2 Log on to the Adobe Exchange website (www.adobe
  • Adobe 65011817 | Extended User Guide - Page 6
    in advanced design tools to develop rich Internet applications and experiences that can run on Adobe® Flash Player or Adobe® AIR™. Adobe AIR export You can package your Fireworks documents as Adobe AIR applications that you can secure using a digital signature. The following APIs have been added or
  • Adobe 65011817 | Extended User Guide - Page 7
    () Calls the ADL tool to preview an HTML document as an Adobe AIR application. AIRext.PackageApplication() Calls the ADT tool package an Adobe AIR application. AIRext.CreatePackage() Calls the ADT tool to create a signed AIR package. AIRext.CheckCertificatePasswor Calls the ADT tool to check
  • Adobe 65011817 | Extended User Guide - Page 8
    array of elements on the canvas to a 32-bit PNG image, based on the image export settings. dom.moveNineScaleGuide() Moves a 9-slice scaling guide's position by specified pixels. dom.placeTextInPath() Places the selected text inside the selected path. If no text and path are selected, no action
  • Adobe 65011817 | Extended User Guide - Page 9
    specified document to the specified file in PDF format. fw.setUseAGMRenderingForSele Sets the currently argument is optional. The following naming conventions are used in this guide: • You refers to the developer who is responsible for writing Adobe online forums at www.adobe.com/support/forums/.
  • Adobe 65011817 | Extended User Guide - Page 10
    to extend the functionality of Adobe Fireworks CS4 by writing or The App object that was used in Fireworks 3 is supported for backward compatibility, but its use is deprecated in favor associated with Fireworks documents, such as ExportOptions, Guides, Path, Image, and Text. For more information
  • Adobe 65011817 | Extended User Guide - Page 11
    is a property of the Document object and contains an array of Brush objects. • shape is a property of the Brush object. Note: Throughout this manual, optional arguments are enclosed in {braces}. Fireworks Object Model calls and API calls In some cases, you can use Fireworks Object Model calls or API
  • Adobe 65011817 | Extended User Guide - Page 12
    matrix:[float, float, float, float, float, float, float, float, float]}. This guide assumes that you know how to use these nine values to construct a three-by of the construction of transformation matrices is beyond the scope of this manual. Point data type The format for a point is {x:float, y:
  • Adobe 65011817 | Extended User Guide - Page 13
    descriptions refer to a panel. Using the common API You can use the common Adobe API if you want commands to use a common syntax (and thus run a this API using app.methodName().The following methods are currently supported in Fireworks and Dreamweaver to let developers easily create commands
  • Adobe 65011817 | Extended User Guide - Page 14
    Last updated 12/8/2009 EXTENDING FIREWORKS 10 The Fireworks Object Model • RectanglePrimitive • PathAttrs • Image To test whether a text block is selected, type the following code: firstSelection = fw.selection[0]; if (firstSelection == "[object Text]"){
  • Adobe 65011817 | Extended User Guide - Page 15
    to those that can be returned for any selected object (for more information, see "Working with properties for any selected object" on page 10). These specific properties are available for each of the following elements when the elements are selected. Hotspot • shape • urlText • altText • targetText
  • Adobe 65011817 | Extended User Guide - Page 16
    Last updated 12/8/2009 EXTENDING FIREWORKS 12 The Fireworks Object Model 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
  • Adobe 65011817 | Extended User Guide - Page 17
    Last updated 12/8/2009 EXTENDING FIREWORKS 13 The Fireworks Object Model pathAttributes Several objects have the pathAttributes property. The following list is the valid set of pathAttributes sub properties that can be returned or set: • brushColor • fillColor • brush • fill • brushTexture •
  • Adobe 65011817 | Extended User Guide - Page 18
    Last updated 12/8/2009 EXTENDING FIREWORKS 14 The Fireworks Object Model confirm(message) Availability Fireworks 3. Usage confirm(message) Arguments message A string containing the message to display. Returns True if OK is clicked, false if Cancel is clicked. Description Displays a string in a
  • Adobe 65011817 | Extended User Guide - Page 19
    Last updated 12/8/2009 EXTENDING FIREWORKS 15 The Fireworks Object Model Arguments arg1, arg2, ..., argN Strings containing content for output. Returns An output file. Description Same as WRITE_HTML; WRITE_HTML was created to let you differentiate HTML output calls from other JavaScript calls in
  • Adobe 65011817 | Extended User Guide - Page 20
    Last updated 12/8/2009 fw.setUseAGMRenderingForSelection() Availability Fireworks 10. Usage fw. setUseAGMRenderingForSelection() Arguments None. Returns Nothing. Description Sets the currently selected vectors to use the new AGM Rendering. Example fw.getDocumentDOM().setUseAGMRenderingForSelection(
  • Adobe 65011817 | Extended User Guide - Page 21
    Last updated 12/8/2009 Method copy(docname1, docname2) Data type string, string createDirectory(dirname) createFile(fileURL, fileType, fileCreator) string string, string, string deleteFile(docOrDir) string deleteFileIfExisting (docOrDir) enumFiles(docOrDir) string string exists(docOrDir)
  • Adobe 65011817 | Extended User Guide - Page 22
    Last updated 12/8/2009 EXTENDING FIREWORKS 18 The Fireworks Object Model Method Data type getTempFilePath ({dirname}) string isDirectory(dirname) string makePathFromDirAndFile(dirna string, string me, plainFilename) open(docname, encoding, bWrite) string, string, Boolean rename(docname,
  • Adobe 65011817 | Extended User Guide - Page 23
    Last updated 12/8/2009 EXTENDING FIREWORKS 19 The Fireworks Object Model Method close() readline() readLineUTF8 write(textString) writeUTF8 Data Type none none string string string Notes Closes the current File Reference object. You are not required to use this method (the file is closed when
  • Adobe 65011817 | Extended User Guide - Page 24
    Last updated 12/8/2009 EXTENDING FIREWORKS 20 The Fireworks Object Model Property findStyle replaceStyle findMinSize findMaxSize replaceSize Data type integer integer integer integer integer Notes Number that represents the style to find: AnyStyle = -1 Plain = 0 Bold = 1 Italic = 2 BoldItalic =
  • Adobe 65011817 | Extended User Guide - Page 25
    -only property). Returns the system color used for menu backgrounds (Windows-only property). Returns the system color used for text in menus (Windows-only property). Adobe AIR Extension AIRext.PreviewDocument() Availability Fireworks
  • Adobe 65011817 | Extended User Guide - Page 26
    tool generated an error (this error is saved into an error log file). Description Calls the ADT tool package an Adobe AIR application. AIRext.CreatePackage() Availability Fireworks 10. Usage status = AIRext.CreatePackage(siteFullPath, packagePath, fileList, appXMLPath, certificatePath, password);
  • Adobe 65011817 | Extended User Guide - Page 27
    to be included in package reside. packagePath Full path of the resulting Adobe AIR package. fileList Array of paths to files and folders that need to be certificate password. AIRext.SaveDigSigPassword() Availability Fireworks 10. Usage AIRext.SaveDigSigPassword(certificatePath, password); Arguments
  • Adobe 65011817 | Extended User Guide - Page 28
    for the given digital certificate, or an empty string. Description Returns the name of the generated password file. AIRext.GetLastErrorLogName() Availability Fireworks 10. Usage errLogName = AIRext.GetLastErrorLogName(); Arguments None. Returns The name of the error log file if it was created, or an
  • Adobe 65011817 | Extended User Guide - Page 29
    and settings\...\Configuration"). Description Returns the full system path name and path of the generated file. AIRext.GetJREVersion() Availability Fireworks 10. Usage jreVersObj = AIRext.GetJREVersion(); Arguments None. Returns An object with two properties - maxVersion and minVersion; if an error
  • Adobe 65011817 | Extended User Guide - Page 30
    Last updated 12/8/2009 Arguments certificatePath Path to digital certificate file that will be created (required). password Password for the created certificate (required) keyType Encryption key type (either "1024-RSA" or "2048-RSA" (required). publisher Name of publisher (required). orgName Name of
  • Adobe 65011817 | Extended User Guide - Page 31
    Last updated 12/8/2009 27 Chapter 3: The Document object This chapter describes the Fireworks Document object and functions. Document object properties The following table lists the properties of the Document object, along with their data types, acceptable values, and notes. Read-only
  • Adobe 65011817 | Extended User Guide - Page 32
    the upper-left of the document when rulers are visible. gridSize.x is the horizontal grid size; gridSize.y is the vertical grid size. Guides object (for more information, see "Guides object" on page 260). Total height of the document, in pixels. To find the bottom edge of the document, use document
  • Adobe 65011817 | Extended User Guide - Page 33
    Last updated 12/8/2009 EXTENDING FIREWORKS 29 The Document object Property mapType matteColor onionSkinAfter onionSkinBefore pageName patterns • pathAttributes pngText resolution resolutionUnits savedSelections textures top useMatteColor width Data type string string integer integer string object
  • Adobe 65011817 | Extended User Guide - Page 34
    create the document. The current version of Fireworks always sets this value to "Adobe Fireworks CS4." You can edit these fields or add your own fields, and documents[documentIndex]. For example: • How a function looks in this manual: dom.addNewHotspot() • How you must type it: fw.getDocumentDOM().
  • Adobe 65011817 | Extended User Guide - Page 35
    Last updated 12/8/2009 EXTENDING FIREWORKS 31 The Document object 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()" on page 116 Using
  • Adobe 65011817 | Extended User Guide - Page 36
    Last updated 12/8/2009 EXTENDING FIREWORKS 32 The Document object Arguments type, target, swapFrame, fileName, preload, downHighlight, downHighlightFrame, downHighlightFilename • Pass "over" for type. • target specifies the slice to which the behavior is attached. Pass -1 for this value; all other
  • Adobe 65011817 | Extended User Guide - Page 37
    Last updated 12/8/2009 EXTENDING FIREWORKS 33 The Document object MM_nbGroup [out] Availability Fireworks 3. Arguments type Pass "out" for type. Description Sets a navigation bar restore behavior. Example fw.getDocumentDOM().addBehavior("MM_nbGroup(\'out\')", "onMouseOut", -1); MM_simpleRollover
  • Adobe 65011817 | Extended User Guide - Page 38
    Last updated 12/8/2009 EXTENDING FIREWORKS 34 The Document object Arguments target, swapFrame, fileName, preload, restoreOnMouseOut • target specifies the slice to which the behavior is attached. Pass1- for this value; all other values are used internally by Fireworks. • swapFrame is an integer
  • Adobe 65011817 | Extended User Guide - Page 39
    ); dom.addGuide() Availability Fireworks 3. Usage dom.addGuide(float position, guidekind) Arguments position A floating-point value that specifies the x or y coordinate at which to add the guide.
  • Adobe 65011817 | Extended User Guide - Page 40
    guidekind is "horizontal", it is assumed that position is a y coordinate; if "vertical", it is an x coordinate. Returns Nothing. Description Adds a guide to the document. If a guide already exists at the specified position, this function has no effect. Example The following command adds a vertical
  • Adobe 65011817 | Extended User Guide - Page 41
    Last updated 12/8/2009 EXTENDING FIREWORKS 37 The Document object Returns Nothing. Description Adds a new hotspot that fits into the specified bounding rectangle. Example The following command adds a new rectangle slice with the specified coordinates: fw.getDocumentDOM().addNewHotspot("slice","
  • Adobe 65011817 | Extended User Guide - Page 42
    Last updated 12/8/2009 EXTENDING FIREWORKS 38 The Document object Returns Nothing. Description Adds a new image to the document containing the contents of the current paint-mode selection. The new image is placed directly above the active bitmap. You must have a current pixel selection for this to
  • Adobe 65011817 | Extended User Guide - Page 43
    Last updated 12/8/2009 EXTENDING FIREWORKS 39 The Document object Example The following command adds a new unshared layer with a default name that is generated by Fireworks: fw.getDocumentDOM().addNewLayer(null, false); dom.addNewLine() Availability Fireworks 3. Usage dom.addNewLine(startPoint,
  • Adobe 65011817 | Extended User Guide - Page 44
    Last updated 12/8/2009 EXTENDING FIREWORKS 40 The Document object Example The following command adds a new oval within the specified coordinates: fw.getDocumentDOM().addNewOval({left:72, top:79, right:236, bottom:228}); dom.addNewPage() Availability Fireworks CS3. Usage dom.addNewPage() Arguments
  • Adobe 65011817 | Extended User Guide - Page 45
    Last updated 12/8/2009 EXTENDING FIREWORKS 41 The Document object See also dom.addNewRectanglePrimitive() dom.addNewRectanglePrimitive() Availability Fireworks 4. Usage dom.addNewRectanglePrimitive(boundingRectangle, roundness) Arguments boundingRectangle A rectangle that specifies the bounds
  • Adobe 65011817 | Extended User Guide - Page 46
    value that controls the regularity of the star or polygon. Pass -1 to have Fireworks calculate a good value, or pass a value between 0 and 1 for manual control. bIsStar If bIsStar is true, a star with the specified number of points is created. If it is false, a regular polygon with the specified
  • Adobe 65011817 | Extended User Guide - Page 47
    Last updated 12/8/2009 EXTENDING FIREWORKS 43 The Document object fw.getDocumentDOM().addNewStar(5, -1, true, {x:186, y:72}, {x:265, y:89}); dom.addNewSubLayer() Availability Fireworks CS3. Usage dom.addNewSubLayer(index, name, shared) Arguments index A long value that specifies the index of the
  • Adobe 65011817 | Extended User Guide - Page 48
    Last updated 12/8/2009 EXTENDING FIREWORKS 44 The Document object 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 text to the library
  • Adobe 65011817 | Extended User Guide - Page 49
    Last updated 12/8/2009 EXTENDING FIREWORKS 45 The Document object Returns true if the swap image behavior was added; false if no suitable hotspot was at the specified location. Description If a single hotspot or slice is selected, this function adds to it a swap image behavior from the hotspot or
  • Adobe 65011817 | Extended User Guide - Page 50
    Last updated 12/8/2009 EXTENDING FIREWORKS 46 The Document object 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.
  • Adobe 65011817 | Extended User Guide - Page 51
    Last updated 12/8/2009 EXTENDING FIREWORKS 47 The Document object dom.appendPointToPath() Availability Fireworks 3. Usage dom.appendPointtoPath(ontourIndex, ptToInsertBefore, controlPointFirst, mainPoint, controlPointLast) Arguments contourIndex An zero-based index value that specifies the contour
  • Adobe 65011817 | Extended User Guide - Page 52
    Last updated 12/8/2009 EXTENDING FIREWORKS 48 The Document object dom.applyCharacterMarkup() Availability Fireworks 3, updated in Fireworks 4. Usage dom.applyCharacterMarkup(tag) Arguments tag Acceptable values for tag are "b", "i", and "u", for bold, italic, and underline: and "fwplain", which
  • Adobe 65011817 | Extended User Guide - Page 53
    Last updated 12/8/2009 EXTENDING FIREWORKS 49 The Document object Usage dom.ApplyEffects(effectList) Arguments effectList An EffectList object (see "EffectList object" on page 247). If effectList is null, this function removes all effects from the selection. Returns Nothing. Description Applies
  • Adobe 65011817 | Extended User Guide - Page 54
    Last updated 12/8/2009 EXTENDING FIREWORKS 50 The Document object Usage dom.applyStyle(styleName, styleIndex) Arguments styleName A string that specifies the style name to be applied. The style group from which the style is being applied should be selected. styleIndex An index to the style to
  • Adobe 65011817 | Extended User Guide - Page 55
    Last updated 12/8/2009 EXTENDING FIREWORKS 51 The Document object dom.attachTextInPath() Availability Fireworks CS4. Usage dom.attachtTextInPath() Arguments None. Returns Nothing. Description Attaches the selected text inside the selected path. If no text and path are selected, no action occurs.
  • Adobe 65011817 | Extended User Guide - Page 56
    page is numbered 0. dom.changeGuide() Availability Fireworks 3. Usage dom.changeGuide(currentPosition, newPosition, guidekind) Arguments currentPosition A floating-point value that specifies the current position of the guide.
  • Adobe 65011817 | Extended User Guide - Page 57
    Last updated 12/8/2009 EXTENDING FIREWORKS 53 The Document object newPosition A floating-point value that specifies the new position of the guide. guidekind Acceptable values for guidekind are "horizontal" and "vertical". If guidekind is "horizontal", it is assumed that the specified positions are
  • Adobe 65011817 | Extended User Guide - Page 58
    and possibly deletes rectangular slices that do not abut the slice guide at currentPosition. isSingleDrag A Boolean value that determines whether the selected slice or on all slices that are affected by the slice guide. If isSingleDrag is true, Fireworks performs only the changeSliceGuide() action
  • Adobe 65011817 | Extended User Guide - Page 59
    : fw.getDocumentDOM().clipCopy(); dom.clipCopyAsPaths() Availability Fireworks MX. Usage dom.clipCopyAsPaths() Arguments None. Returns Nothing. Description Copies the selection to the clipboard in Adobe Illustrator format. Example The following command copies the selected items to the clipboard in
  • Adobe 65011817 | Extended User Guide - Page 60
    MX. Usage dom.clipCopyFormats(format) Arguments format The graphics format for the selection. For example, "AICB" is the Adobe Illustrator format. Returns Nothing. Description Copies the selection to the clipboard using the specified format. dom.clipCopyJsToExecute() Availability Fireworks 9. Usage
  • Adobe 65011817 | Extended User Guide - Page 61
    Last updated 12/8/2009 EXTENDING FIREWORKS 57 The Document object Returns Nothing. Description Cuts the selection to the clipboard. Example The following command cuts the selected items and places them on the clipboard: fw.getDocumentDOM().clipCut(); dom.clipPaste() Availability Fireworks 3,
  • Adobe 65011817 | Extended User Guide - Page 62
    Last updated 12/8/2009 EXTENDING FIREWORKS 58 The Document object Usage dom.clipPasteAsMask(whatIfResolutionDifferent, masktype, maskReplaceOptions) Arguments whatIfResolutionDifferent A string that specifies how resampling should be done if the resolution of the clipboard contents doesn't match
  • Adobe 65011817 | Extended User Guide - Page 63
    Last updated 12/8/2009 EXTENDING FIREWORKS 59 The Document object dom.clipPasteFromChannelToChannel() Availability Fireworks MX. Usage dom.clipPasteFromChannelToChannel(fromChannel, toChannel) Arguments fromChannel If the current selection is not a single bitmap, a new opaque bitmap is created and
  • Adobe 65011817 | Extended User Guide - Page 64
    Last updated 12/8/2009 EXTENDING FIREWORKS 60 The Document object Description Pastes the clipboard contents into the selection, and places the selected element into the element mask for the pasted elements. If the selected element already has a mask, this function groups the pasted elements with
  • Adobe 65011817 | Extended User Guide - Page 65
    Last updated 12/8/2009 EXTENDING FIREWORKS 61 The Document object Arguments bPromptToSaveChanges If bPromptToSaveChanges is true, and the document was changed since the last time it was saved, the user is prompted to save any changes to the document. If bPromptToSaveChanges is false, the user is
  • Adobe 65011817 | Extended User Guide - Page 66
    Last updated 12/8/2009 EXTENDING FIREWORKS 62 The Document object Description Converts marquee selection to path. dom.convertPathToMarquee() Availability Fireworks 7. Usage dom.convertPathToMarquee(mode, featherAmount) Arguments mode Sets the mode. Acceptable values are "hard edge", "antialias",
  • Adobe 65011817 | Extended User Guide - Page 67
    Last updated 12/8/2009 EXTENDING FIREWORKS 63 The Document object Returns Nothing. Description Converts the selected items to a new animation symbol. See also dom.convertAnimSymbolToGraphicSymbol(), dom.convertToSymbol(), dom.setAnimInstanceNumFrames() dom.convertToPaths() Availability Fireworks
  • Adobe 65011817 | Extended User Guide - Page 68
    Last updated 12/8/2009 EXTENDING FIREWORKS 64 The Document object Description Converts the selected item(s) to a new symbol. Example The following command creates a graphic symbol from the selected item and names it "star": fw.getDocumentDOM().convertToSymbol("graphic", "star"); See also dom.
  • Adobe 65011817 | Extended User Guide - Page 69
    Last updated 12/8/2009 EXTENDING FIREWORKS 65 The Document object dom.copyHtmlWizard() Availability Fireworks MX. Usage dom.copyHtmlWizard() Arguments None. Returns Nothing. Description Opens the Copy HTML Wizard dialog box. Example The following command opens the Copy HTML Wizard dialog box: fw.
  • Adobe 65011817 | Extended User Guide - Page 70
    Last updated 12/8/2009 EXTENDING FIREWORKS 66 The Document object Example The following command adds a hotspot to the selected item. If more than one item is selected, Fireworks creates one hotspot for each item. fw.getDocumentDOM().copyToHotspot("hotspot", "multiple"); dom.cropSelection()
  • Adobe 65011817 | Extended User Guide - Page 71
    Last updated 12/8/2009 EXTENDING FIREWORKS 67 The Document object Usage dom.deleteFrames(frameIndex, howMany) Arguments frameIndex An integer value that specifies the location at which to begin deleting frames, starting with 0 (although, to specify the current frame, pass -1). howMany Specifies
  • Adobe 65011817 | Extended User Guide - Page 72
    Last updated 12/8/2009 EXTENDING FIREWORKS 68 The Document object Arguments pageNum A long value that indicates the page number of the page to be deleted. Returns Nothing. Description Deletes a specified page from the current document. For example: fw.getDocumentDOM().deletePageAt(0) dom.
  • Adobe 65011817 | Extended User Guide - Page 73
    Last updated 12/8/2009 EXTENDING FIREWORKS 69 The Document object Arguments selection The name of the saved bitmap selection. Returns Nothing. Description Deletes the selection or the pixel selection if Fireworks is in bitmap mode. Example If Fireworks is not in bitmap mode, the following command
  • Adobe 65011817 | Extended User Guide - Page 74
    Last updated 12/8/2009 EXTENDING FIREWORKS 70 The Document object Arguments symbolName The name of the symbol to delete from the library. If more than one symbol exists with this name, only the first symbol is deleted. • To delete all the selected symbols from the library (not document), pass null
  • Adobe 65011817 | Extended User Guide - Page 75
    Last updated 12/8/2009 EXTENDING FIREWORKS 71 The Document object Returns Nothing. Description Splits the selected text-on-a-path items into its original text and path items. dom.detachSharedLayer() Availability Fireworks CS3. Usage dom.detachSharedLayer(layerNum, pageNum) Arguments layerNum A
  • Adobe 65011817 | Extended User Guide - Page 76
    Last updated 12/8/2009 EXTENDING FIREWORKS 72 The Document object Description Distributes the selection along a vertical or horizontal dimension. dom.distributeLayerToFrames() Availability Fireworks 3. Usage dom.distributeLayerToFrames(layerIndex) Arguments layerIndex An integer value that
  • Adobe 65011817 | Extended User Guide - Page 77
    Last updated 12/8/2009 EXTENDING FIREWORKS 73 The Document object Usage dom.dragControlPoint(index, newLoc, shiftKeyDown, ctrlCmdKeyDown, altOptKeyDown) Arguments index The index of the control point to move. newLoc Specifies the new location of the point. shiftKeyDown Specifies whether the Shift
  • Adobe 65011817 | Extended User Guide - Page 78
    Last updated 12/8/2009 EXTENDING FIREWORKS 74 The Document object dom.duplicateLayer() Availability Fireworks 3. Usage dom.duplicateLayer(layerIndex, {howMany}, {where}) Arguments layerIndex An integer value that specifies the layer to duplicate, starting with 0 (although, to specify the current
  • Adobe 65011817 | Extended User Guide - Page 79
    Last updated 12/8/2009 EXTENDING FIREWORKS 75 The Document object dom.duplicateSelection() Availability Fireworks 3. Usage dom.duplicateSelection() Arguments None. Returns Nothing. Description Makes a duplicate of the selection, offsetting it slightly from the original. Example The following
  • Adobe 65011817 | Extended User Guide - Page 80
    Last updated 12/8/2009 EXTENDING FIREWORKS 76 The Document object dom.duplicateSelectionToFrames() Availability Fireworks 3. Usage dom.cuplicateSelectionToFrames(whichFrames) Arguments whichFrames Acceptable values are "all", "previous", "next", and "end". Note that "end" means the last frame of
  • Adobe 65011817 | Extended User Guide - Page 81
    Last updated 12/8/2009 EXTENDING FIREWORKS 77 The Document object Arguments None. Returns Nothing. Description If any symbol instances are selected, this function makes duplicate symbols of all the symbols that are pointed to by those instances. The selected instances are updated to point to the
  • Adobe 65011817 | Extended User Guide - Page 82
    Last updated 12/8/2009 EXTENDING FIREWORKS 78 The Document object newSelectionMask An optional bitmap selection mask. If newSelectionMask is not null, and selectAndEnterPaintModeIfPossible is true, the selection will be set on the mask after entering paint mode. This argument is null by default.
  • Adobe 65011817 | Extended User Guide - Page 83
    Last updated 12/8/2009 EXTENDING FIREWORKS 79 The Document object Description Turns anti-aliasing on or off for the selected blocks of text. dom.enterPaintMode() Availability Fireworks 3, with the argument newSelectionMask added in Fireworks MX. Usage dom.enterPaintMode({newSelectionMask})
  • Adobe 65011817 | Extended User Guide - Page 84
    Nested Symbols. Returns Nothing. Description Exits the symbol edit mode through the number of levels specified. dom.exportElements() Availability Fireworks 10. Usage dom.exportElements(elements, fileUrl, imagesUrl, name) Arguments elements An array that contains the objects to be exported. imagesUrl
  • Adobe 65011817 | Extended User Guide - Page 85
    Last updated 12/8/2009 EXTENDING FIREWORKS 81 The Document object Description Replaces the values in dom.exportOptions.paletteEntries with those in the specified GIF or ACT file. This function also sets dom.exportOptions.paletteMode to "custom". For more information, see "ExportOptions object" on
  • Adobe 65011817 | Extended User Guide - Page 86
    Last updated 12/8/2009 EXTENDING FIREWORKS 82 The Document object dom.fillSelectedPixels() Availability Fireworks 3. Usage dom.fillSelectedPixels(clickPt, p1, p2, p3, bFillSelectionOnly, tolerance, edgemode, featherAmt) Arguments clickPt A point that specifies the x,y coordinates of the pixel to
  • Adobe 65011817 | Extended User Guide - Page 87
    Last updated 12/8/2009 EXTENDING FIREWORKS 83 The Document object 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
  • Adobe 65011817 | Extended User Guide - Page 88
    Last updated 12/8/2009 EXTENDING FIREWORKS 84 The Document object name A string that specifies the name of the pixel filter to be applied. Acceptable values depend on which filters you have installed. Returns Nothing. Description Applies the specified pixel filter to the selection as a permanent
  • Adobe 65011817 | Extended User Guide - Page 89
    Last updated 12/8/2009 EXTENDING FIREWORKS 85 The Document object 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
  • Adobe 65011817 | Extended User Guide - Page 90
    Last updated 12/8/2009 EXTENDING FIREWORKS 86 The Document object Returns True if the guides are locked; false otherwise. Description Determines if the guides are locked. dom.getPageSetter() Availability Fireworks 9. Usage dom.getPageSetter() Arguments None. Returns The PageSetter object which
  • Adobe 65011817 | Extended User Guide - Page 91
    Last updated 12/8/2009 EXTENDING FIREWORKS 87 The Document object Usage dom.getPixelMask() Arguments None. Returns The mask for the current pixel selection. Returns null if Fireworks is not in bitmap mode, or if there is no pixel selection. For information on the format of mask variables, see "
  • Adobe 65011817 | Extended User Guide - Page 92
    . dom.getShowGuides() Availability Fireworks 8. Usage dom.getShowGuides() Arguments None. Returns true if the guides are visible; false otherwise. Description Determines if the guides are visible. dom.getShowRulers() Availability Fireworks 3. Usage dom.getShowRulers() Arguments None. Returns true
  • Adobe 65011817 | Extended User Guide - Page 93
    EXTENDING FIREWORKS 89 The Document object Arguments None. Returns true if the Snap to Guides function is available; false otherwise. Description Determines if the Snap to Guides function is available. dom.getSnapToGrid() Availability Fireworks 3. Usage dom.getSnapToGrid() Arguments None. Returns
  • Adobe 65011817 | Extended User Guide - Page 94
    Last updated 12/8/2009 EXTENDING FIREWORKS 90 The Document object dom.group() Availability Fireworks 3, argument deprecated in 4. Usage dom.group({type}) Arguments type An optional string that specifies how to group the items. Acceptable values are "normal", "mask to image", and "mask to path". If
  • Adobe 65011817 | Extended User Guide - Page 95
    Last updated 12/8/2009 EXTENDING FIREWORKS 91 The Document object Usage dom.hasMasterPage() Arguments None. Returns A Boolean value of true if the current document has a master page, or false if there is no master page. Description Indicates whether or not a master page exists for the specified
  • Adobe 65011817 | Extended User Guide - Page 96
    Last updated 12/8/2009 EXTENDING FIREWORKS 92 The Document object bMaintainAspectRatio If bMaintainAspectRatio is true, the file is scaled to the largest size that fits within boundingRectangle while retaining the file's current aspect ratio. (This is a handy option for creating thumbnails.) If it
  • Adobe 65011817 | Extended User Guide - Page 97
    Last updated 12/8/2009 EXTENDING FIREWORKS 93 The Document object Arguments filepath The fileURL of the file that contains the symbol to be copied. whichSymbol The index of the symbol within the document, which is specified in the filepath. Returns Nothing. Description Extracts the component
  • Adobe 65011817 | Extended User Guide - Page 98
    Last updated 12/8/2009 EXTENDING FIREWORKS 94 The Document object ptToInsertBefore A zero-based index that specifies where the new point should be placed on the path. The new point is appended in front of the point that this integer represents: To add a point to the beginning of the path, pass 0;
  • Adobe 65011817 | Extended User Guide - Page 99
    Last updated 12/8/2009 EXTENDING FIREWORKS 95 The Document object Usage dom.insertSymbolAt(uiName, locationPoint) Arguments uiName The name of the symbol in the library. If more than one symbol exists with the specified name, Fireworks inserts the first symbol named. locationPoint The center of
  • Adobe 65011817 | Extended User Guide - Page 100
    Last updated 12/8/2009 EXTENDING FIREWORKS 96 The Document object Description Indicates whether or not the specified layer is a master page layer. For example: fw.getDocumentDOM().isMasterPageLayer(0) dom.isSelectionDirectlyAboveBitmapObject() Availability Fireworks MX. Usage dom.
  • Adobe 65011817 | Extended User Guide - Page 101
    Last updated 12/8/2009 EXTENDING FIREWORKS 97 The Document object Usage dom.knifeElementsFromPoint(from, tolerance) Arguments from A point that specifies the x,y coordinates of the point that the user clicked (see "Point data type" on page 8). tolerance A floating-point value > = 0 that specifies
  • Adobe 65011817 | Extended User Guide - Page 102
    scaling between locked and unlocked. Returns Nothing. Description Locks or unlocks 9-slice scaling guides for the selected symbol. Example The following command locks 9-slice scaling guides for the selected symbol: fw.getDocumentDOM().lockNineScale(true); dom.lockSelection() Availability Fireworks
  • Adobe 65011817 | Extended User Guide - Page 103
    Last updated 12/8/2009 EXTENDING FIREWORKS 99 The Document object Usage dom.lockSelection() Arguments None. Returns Nothing. Description Locks the selection. dom.makeFind() Availability Fireworks 3. Usage dom.MakeFind(findSpec) Arguments findSpec A Find object (see "Find object" on page 19).
  • Adobe 65011817 | Extended User Guide - Page 104
    Last updated 12/8/2009 EXTENDING FIREWORKS 100 The Document object 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
  • Adobe 65011817 | Extended User Guide - Page 105
    Last updated 12/8/2009 EXTENDING FIREWORKS 101 The Document object dom.motionBlurSelection() Availability Fireworks MX 2004. Usage dom.motionBlurSelection(typeStr, angle, distance, samples) Arguments typeStr A string that specifies the type of blur to apply. Valid values are "linear", "radial",
  • Adobe 65011817 | Extended User Guide - Page 106
    Last updated 12/8/2009 EXTENDING FIREWORKS 102 The Document object Description Moves the specified point's Bézier handles by a certain amount. dom.moveElementMaskBy() Availability Fireworks 4. Usage dom.moveElementMaskBy(delta) Arguments delta A point that specifies the x,y coordinate values by
  • Adobe 65011817 | Extended User Guide - Page 107
    amount. See also dom.moveElementMaskBy() dom.moveNineScaleGuide() Availability Fireworks 10. Usage dom.moveNineScaleGuide(delta, guidekind) Arguments delta A guide is moved. guidekind Direction in which the 9-slice scaling guide is moved. Returns Nothing. Description Moves a 9-slice scaling guide's
  • Adobe 65011817 | Extended User Guide - Page 108
    EXTENDING FIREWORKS 104 The Document object Example The following command moves a horizontal top guide by 10 pixels. fw.getDocumentDOM().moveNineScaleGuide("horizontal-top",10); dom.movePixelMaskBy() Availability Fireworks 4. Usage dom.movePixelMaskBy(delta) Arguments delta A point that specifies
  • Adobe 65011817 | Extended User Guide - Page 109
    Last updated 12/8/2009 EXTENDING FIREWORKS 105 The Document object dom.movePointOnHotspotByWithFlags() Availability Fireworks MX. Usage dom.MovePointOnHotspotByWithFlags(ptToModifyIndex, delta, flags) Arguments ptToModifyIndex A zero-based index that specifies which point on the path is to move.
  • Adobe 65011817 | Extended User Guide - Page 110
    Last updated 12/8/2009 EXTENDING FIREWORKS 106 The Document object Usage dom.moveSelectionBy(delta, bMakeCopy, doSubSel) Arguments delta A point that specifies the x,y coordinate values by which the selection moved (see "Point data type" on page 8). For example, passing ({x:1,y:2}) moves the
  • Adobe 65011817 | Extended User Guide - Page 111
    Last updated 12/8/2009 EXTENDING FIREWORKS 107 The Document object Usage dom.moveSelectionTo(location, bMakeCopy, doSubSel) Arguments location A point that specifies the x-,y-coordinate values of the location to which the selection is moved or copied (see "Point data type" on page 8). bMakeCopy
  • Adobe 65011817 | Extended User Guide - Page 112
    Last updated 12/8/2009 EXTENDING FIREWORKS 108 The Document object Usage dom.moveSelectionToLayer(layerIndex, bMakeCopy, {whatIfMultipleSelected}, {elementIndex}) Arguments layerIndex An integer value that specifies the layer to which the selection should be moved or copied, starting with 0 (
  • Adobe 65011817 | Extended User Guide - Page 113
    Last updated 12/8/2009 EXTENDING FIREWORKS 109 The Document object Usage dom.pageName() Arguments None. Returns A string specifying the name of the current page. Description Indicates the name of the current page. For example: fw.getDocumentDOM().pageName dom.pathCrop() Availability Fireworks 3.
  • Adobe 65011817 | Extended User Guide - Page 114
    Last updated 12/8/2009 EXTENDING FIREWORKS 110 The Document object Returns Nothing. Description Performs an expand operation on the selected paths. dom.pathInset() Availability Fireworks 3. Usage dom.pathInset(width, miter, join) Arguments width A floating-point value that specifies the new width
  • Adobe 65011817 | Extended User Guide - Page 115
    Last updated 12/8/2009 EXTENDING FIREWORKS 111 The Document object dom.pathPunch() Availability Fireworks 3. Usage dom.pathPunch() Arguments None. Returns Nothing. Description Performs a punch operation on the selected paths. dom.pathSimplify() Availability Fireworks 3. Usage dom.pathSimplify(
  • Adobe 65011817 | Extended User Guide - Page 116
    FIREWORKS 112 The Document object Returns Nothing. Description Performs a union operation on the selected paths. dom.placeTextInPath() Availability Fireworks 10. Usage dom.placeTextInPath() Arguments None. Returns Nothing. Description Places the selected text inside the selected path. If no text
  • Adobe 65011817 | Extended User Guide - Page 117
    the document. This is the same behavior as choosing Rebuild Color Table from the Color Table panel. dom.redefineStyleByName() Availability Fireworks 10. Usage dom.redefineStyleByName(sourcestyle, targetstyle) Arguments sourcestyle Name of the source style. targetstyle Name of the style that is being
  • Adobe 65011817 | Extended User Guide - Page 118
    Last updated 12/8/2009 EXTENDING FIREWORKS 114 The Document object Description Redefines the target style with the source style. Example The following command redefines the attributes of the target style "Chrome Reflective 016" with the attributes of the source style "Chrome Misc 011". fw.
  • Adobe 65011817 | Extended User Guide - Page 119
    Last updated 12/8/2009 EXTENDING FIREWORKS 115 The Document object dom.redrawSmartShape() Availability Fireworks 8. Usage dom.redrawSmartShape() Arguments None. Returns Nothing. Description Forces the Auto Shapes in the document to redraw. This method is useful when modifying a Auto Shape outside
  • Adobe 65011817 | Extended User Guide - Page 120
    FIREWORKS 116 The Document object Arguments guidekind Acceptable values are "horizontal" and "vertical". Returns Nothing. Description Removes all guides of the specified type. dom.removeBehavior() Availability Fireworks 3. Usage dom.removeBehavior({event}, {eventIndex}) Arguments event An optional
  • Adobe 65011817 | Extended User Guide - Page 121
    Last updated 12/8/2009 EXTENDING FIREWORKS 117 The Document object Description Sets the brush of the selection to None. dom.removeCharacterMarkup() Availability Fireworks 3. Usage dom.removeCharacterMarkup(tag) Arguments tag Acceptable values are "b", "i", and "u", for bold, italic, and underline.
  • Adobe 65011817 | Extended User Guide - Page 122
    .removeGuide() Availability Fireworks 3. Usage dom.removeGuide(position, guidekind) Arguments position A floating-point value that specifies the position of the guide to be removed. guidekind Acceptable values are "horizontal" and "vertical". If guidekind is "horizontal", it is assumed that position
  • Adobe 65011817 | Extended User Guide - Page 123
    Last updated 12/8/2009 Description Removes the specified guide. If no guide is at that position, this function has no effect. dom.removeNineScale() Availability Fireworks CS3 Usage dom.removeNineScale(status) Arguments None. Returns Nothing. Description Removes 9-slice
  • Adobe 65011817 | Extended User Guide - Page 124
    Last updated 12/8/2009 EXTENDING FIREWORKS 120 The Document object Usage dom.reorderFrame(frameToMove, frameToPutItBefore, bMakeCopy) Arguments frameToMove A zero-based index that specifies which frame to move or copy. frameToPutItBefore A zero-based index that specifies where to place the frame
  • Adobe 65011817 | Extended User Guide - Page 125
    Last updated 12/8/2009 EXTENDING FIREWORKS 121 The Document object dom.reorderPages() Availability Fireworks CS3. Usage dom.reorderPages(origPos, newPos) Arguments origPos A long value that indicates the page number (position) of the page to be moved. newPos A long value that indicates the new
  • Adobe 65011817 | Extended User Guide - Page 126
    Last updated 12/8/2009 EXTENDING FIREWORKS 122 The Document object dom.replaceButtonTextStringsInInstances() Availability Fireworks 3. Usage dom.replaceButtonTextStringsInInstances(newString, uniformAttrs) Arguments newString Specifies the string to be used as replacement text. uniformAttrs
  • Adobe 65011817 | Extended User Guide - Page 127
    Last updated 12/8/2009 EXTENDING FIREWORKS 123 The Document object dom.resetNineScale() Availability Fireworks CS3 Usage dom.resetNineScale(status) Arguments None. Returns Nothing. Description Resets 9-slice scaling for the selected symbol back to default. Example The following command resets 9-
  • Adobe 65011817 | Extended User Guide - Page 128
    Last updated 12/8/2009 EXTENDING FIREWORKS 124 The Document object Arguments None. Returns Nothing. Description Restores the selection that is specified in dom.saveJPEGMask(). See also dom.saveJPEGMask() dom.restoreSelection() Availability Fireworks 4. Usage dom.restoreSelection(selectionName,
  • Adobe 65011817 | Extended User Guide - Page 129
    Last updated 12/8/2009 EXTENDING FIREWORKS 125 The Document object 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.
  • Adobe 65011817 | Extended User Guide - Page 130
    Last updated 12/8/2009 EXTENDING FIREWORKS 126 The Document object Description Rotates the selection clockwise by the specified number of degrees. Rotating 270º is the same behavior as rotating 90º counterclockwise. dom.save() Availability Fireworks 3. Usage dom.save({bOkToSaveAs}) Arguments
  • Adobe 65011817 | Extended User Guide - Page 131
    Last updated 12/8/2009 EXTENDING FIREWORKS 127 The Document object Usage dom.saveJPEGMask() Arguments None. Returns Nothing. Description Stores the current selection in bitmap mode as the "Selective JPEG mask". Use dom.restoreJPEGMask() to restore the JPEG mask. See also dom.restoreJPEGMask() dom.
  • Adobe 65011817 | Extended User Guide - Page 132
    top, right, bottom) Arguments bounds Specifies the bounds of the grid rectangle. Returns Nothing. Description Sets the positions of the 9-slice scaling guides by specifying the size of the rectangle they surround. Example The following command sets the 9-slice scaling grid rectangle to -50, -50, 50
  • Adobe 65011817 | Extended User Guide - Page 133
    Last updated 12/8/2009 EXTENDING FIREWORKS 129 The Document object dom.selectAdjustPixelSel() Availability Fireworks 3. Usage dom.selectAdjustPixelSel(whatToDo, amount) Arguments whatToDo Acceptable values are "expand", "contract", "border", and "smooth". • Use "expand" to expand the pixel
  • Adobe 65011817 | Extended User Guide - Page 134
    Last updated 12/8/2009 EXTENDING FIREWORKS 130 The Document object dom.selectAllOnLayer() Availability Fireworks MX. Usage dom.selectAllOnLayer(layerIndex, bRememberSelection, bToggleSelection) Arguments layerIndex A long integer that identifies the layer on which to select the element.
  • Adobe 65011817 | Extended User Guide - Page 135
    Last updated 12/8/2009 EXTENDING FIREWORKS 131 The Document object dom.selectFeather() Availability Fireworks 3. Usage dom.selectFeather(featherAmount) Arguments featherAmount An integer that specifies the number of pixels by which to feather the selection. Returns Nothing. Description If
  • Adobe 65011817 | Extended User Guide - Page 136
    Last updated 12/8/2009 EXTENDING FIREWORKS 132 The Document object Returns Nothing. Description Deselects any selected items. If Fireworks is in image edit mode, has a pixel selection, and has a Selection tool selected, then this function deselects the pixels and exits image edit mode. dom.
  • Adobe 65011817 | Extended User Guide - Page 137
    Last updated 12/8/2009 EXTENDING FIREWORKS 133 The Document object Returns Nothing. Description If Fireworks is in bitmap mode and a pixel selection is active, this function selects all pixels in the current image that are within the specified tolerance of the average color in the current pixel
  • Adobe 65011817 | Extended User Guide - Page 138
    Last updated 12/8/2009 EXTENDING FIREWORKS 134 The Document object Arguments fileAttachment A string, which is expressed as file://URL, denoting the location of a file to send by e-mail. Returns Nothing. Description Creates a new e-mail with the specified file as an attachment. Example The
  • Adobe 65011817 | Extended User Guide - Page 139
    Last updated 12/8/2009 EXTENDING FIREWORKS 135 The Document object Returns Nothing. Description Sets the loop count of the selected instances of multi-frame image symbols. dom.setAnimInstanceNumFrames() Availability Fireworks 4. Usage dom.setAnimInstanceNumFrames(numFrames) Arguments numFrames An
  • Adobe 65011817 | Extended User Guide - Page 140
    Last updated 12/8/2009 EXTENDING FIREWORKS 136 The Document object dom.setAnimInstanceRotationAmount() Availability Fireworks 4. Usage dom.setAnimInstanceRotationAmount(rotationAmount) Arguments rotationAmount A floating-point value that specifies the degree of rotation to be applied to the
  • Adobe 65011817 | Extended User Guide - Page 141
    Last updated 12/8/2009 EXTENDING FIREWORKS 137 The Document object dom.setAnimInstanceStartEndOpacity() Availability Fireworks 4. Usage dom.setAnimInstanceStartEndOpacity(startOpacity, endOpacity) Arguments startOpacity and endOpacity Float values between 0 and 100 that specify the starting and
  • Adobe 65011817 | Extended User Guide - Page 142
    Last updated 12/8/2009 EXTENDING FIREWORKS 138 The Document object Arguments mode Acceptable values are "normal", "multiply", "screen", "darken", "lighten", "difference", "hue", "saturation", "color", "luminosity", "invert", "tint", and "erase". Returns Nothing. Description Specifies the blend
  • Adobe 65011817 | Extended User Guide - Page 143
    Last updated 12/8/2009 See also dom.setBrushNColorNTexture() dom.setBrushName() Availability Fireworks 3. Usage dom.setBrushName(category, currentName, newName) Arguments category A string that specifies the category of the brush to be renamed. currentName A string that specifies the current name of
  • Adobe 65011817 | Extended User Guide - Page 144
    Last updated 12/8/2009 Usage dom.setBrushNColorNTexture(brush, color, texture-name) Arguments brush A Brush object (see "Brush object" on page 236). color A color string (see "Color string data type" on page 7). texture-name The name of the texture to be applied. Returns Nothing. Description Sets
  • Adobe 65011817 | Extended User Guide - Page 145
    Last updated 12/8/2009 EXTENDING FIREWORKS 141 The Document object 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
  • Adobe 65011817 | Extended User Guide - Page 146
    Last updated 12/8/2009 EXTENDING FIREWORKS 142 The Document object Usage dom.setButtonShowDownOnLoad(bShowDownOnLoad) Arguments bShowDownOnLoad Boolean. If true, the Down-State-on-Load is shown in the button; if false, it is not. Returns Nothing. Description If the user edits a Button document,
  • Adobe 65011817 | Extended User Guide - Page 147
    Last updated 12/8/2009 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
  • Adobe 65011817 | Extended User Guide - Page 148
    Last updated 12/8/2009 EXTENDING FIREWORKS 144 The Document object fw.getDocumentDOM().setDocumentCanvasColor("#0000ff"); dom.setDocumentCanvasSize() Availability Fireworks 3, with new argument added in Fireworks CS3. Usage dom.setDocumentCanvasSize(boundingRectangle, currentPageOnly) Arguments
  • Adobe 65011817 | Extended User Guide - Page 149
    Last updated 12/8/2009 EXTENDING FIREWORKS 145 The Document object 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.
  • Adobe 65011817 | Extended User Guide - Page 150
    Last updated 12/8/2009 EXTENDING FIREWORKS 146 The Document object Description Scales the document to fit in the specified rectangle at the specified resolution. dom.setDocumentResolution() Availability Fireworks 3. Usage dom.setDocumentResolution(resolution) Arguments resolution Specifies the
  • Adobe 65011817 | Extended User Guide - Page 151
    Last updated 12/8/2009 EXTENDING FIREWORKS 147 The Document object Usage dom.setElementLocked(frameNum, layerNum, objectIndex, bLock, bAllLayers, bLockLayers) Arguments frameNum A zero-based integer that specifies the frame that contains the element or elements to be locked. To specify the current
  • Adobe 65011817 | Extended User Guide - Page 152
    Last updated 12/8/2009 EXTENDING FIREWORKS 148 The Document object Usage dom.setElementMaskMode(mode) Arguments mode Acceptable values are "mask to image" and "mask to path". Returns Nothing. Description Sets the rendering mode on the selected element's element mask. Only one element can be
  • Adobe 65011817 | Extended User Guide - Page 153
    Last updated 12/8/2009 EXTENDING FIREWORKS 149 The Document object Description Sets the name of the selected element(s). See also dom.findNamedElements() dom.setElementVisible() Availability Fireworks 4. Usage dom.setElementVisisble(frameIndex, layerIndex, elementIndex, bShow) Arguments frameIndex
  • Adobe 65011817 | Extended User Guide - Page 154
    Last updated 12/8/2009 EXTENDING FIREWORKS 150 The Document object Arguments name A string that specifies the name of the element(s) to be shown or hidden. If more than one element has the same name, this function shows or hides all of them. bShow Boolean. If true, the elements are visible; they
  • Adobe 65011817 | Extended User Guide - Page 155
    Last updated 12/8/2009 Description Sets the document export settings. dom.setFill() Availability Fireworks 3. Usage dom.setFill(fill) Arguments fill A Fill object (see "Fill object" on page 258). Returns Nothing. Description Sets the selection to the specified fill. dom.setFillColor() Availability
  • Adobe 65011817 | Extended User Guide - Page 156
    Last updated 12/8/2009 EXTENDING FIREWORKS 152 The Document object Arguments edgemode Acceptable values are "hard edge", "antialias", and "feather". featherAmt An integer that specifies the number of pixels to feather. This value is ignored if edgemode is not "feather". Returns Nothing.
  • Adobe 65011817 | Extended User Guide - Page 157
    and no texture: fw.getDocumentDOM().setFillNColorNTexture({ category:"fc_Linear", ditherColors:[ "#000000", "#000000" ], edgeType:"antialiased", feather:10, gradient:{ name:"cn_WhiteBlack", nodes:[ { color:"#ffffff", position:0 }, { color:"#000000", position:1 } ] }, name:"fn_Normal", pattern:null
  • Adobe 65011817 | Extended User Guide - Page 158
    Last updated 12/8/2009 EXTENDING FIREWORKS 154 The Document object dom.setFillVectorStart() Availability Fireworks 3. Usage dom.setFillVectorStart(p1) Arguments p1 A point that specifies the x,y coordinates of the fill start point (see "Point data type" on page 8). Returns Nothing. Description
  • Adobe 65011817 | Extended User Guide - Page 159
    Last updated 12/8/2009 EXTENDING FIREWORKS 155 The Document object Arguments gridOrigin A point that specifies the x,y coordinates of the document's grid origin (see "Point data type" on page 8). Returns Nothing. Description Sets the grid origin for the document. dom.setGridSize() Availability
  • Adobe 65011817 | Extended User Guide - Page 160
    A color string (see "Color string data type" on page 7). Returns Nothing. Description Sets the color that is used to display normal (nonslice) guides. To set the color of slice guides, use dom.setSliceGuideColor(). See also dom.setSliceGuideColor() dom.setHotspotAltTag() Availability Fireworks 3.
  • Adobe 65011817 | Extended User Guide - Page 161
    Last updated 12/8/2009 EXTENDING FIREWORKS 157 The Document object Usage dom.setHotspotAltTag(whatToSet, altTagString) Arguments whatToSet Acceptable values are "hotspots", "slices", and "hotspots and slices". altTagString A string that specifies the text to be used for the alt tag. Returns
  • Adobe 65011817 | Extended User Guide - Page 162
    Last updated 12/8/2009 EXTENDING FIREWORKS 158 The Document object Usage dom.setHotspotRectangle(boundingRectangle, bMakeCopy) Arguments boundingRectangle A rectangle that specifies the size of the new hotspot or slice (see "Rectangle data type" on page 8). bMakeCopy A Boolean value; if it is true
  • Adobe 65011817 | Extended User Guide - Page 163
    Last updated 12/8/2009 EXTENDING FIREWORKS 159 The Document object Returns Nothing. Description Sets the target tag text to the specified value for the hotspots and slices in the selection. Example The following command links the currently selected slices to the parent window: fw.getDocumentDOM().
  • Adobe 65011817 | Extended User Guide - Page 164
    Last updated 12/8/2009 EXTENDING FIREWORKS 160 The Document object dom.setLayerDisclosure() Availability Fireworks 4. Usage dom.setLayerDisclosure(layerIndex, bDisclosed) Arguments layerIndex An integer value that specifies the layer that contains the elements to be displayed or hidden, starting
  • Adobe 65011817 | Extended User Guide - Page 165
    Last updated 12/8/2009 EXTENDING FIREWORKS 161 The Document object Description Locks or unlocks one or all the layers on the specified frame. Example The following command locks all the layers on the first frame: fw.getDocumentDOM().setLayerLocked(1, 0, true, true); dom.setLayerName() Availability
  • Adobe 65011817 | Extended User Guide - Page 166
    Last updated 12/8/2009 EXTENDING FIREWORKS 162 The Document object Returns Nothing. Description Changes the Shared layer status of a layer. Example The following command sets the selected layer to Shared and displays a warning that data loss is possible: fw.getDocumentDOM().setLayerSharing(-1, "
  • Adobe 65011817 | Extended User Guide - Page 167
    Last updated 12/8/2009 EXTENDING FIREWORKS 163 The Document object Returns Nothing. Description Sets the specified page to be the document's master page. For example: fw.getDocumentDOM().setMasterPage(0) dom.setMatteColor() Availability Fireworks 3. Usage dom.setMatteColor(bUseMatteColor,
  • Adobe 65011817 | Extended User Guide - Page 168
    12/8/2009 EXTENDING FIREWORKS 164 The Document object Description Sets the color that is used to display 9-slice (nonslice) guides. dom.setPixelMask() Availability Fireworks 3, deprecated in 4 in favor of dom.setSelectionMask(). Usage dom.setPixelMask(mask, howToCombineMasks) Arguments mask A mask
  • Adobe 65011817 | Extended User Guide - Page 169
    Last updated 12/8/2009 EXTENDING FIREWORKS 165 The Document object Example The following command turns on onion skinning two frames before the selected frame and zero frames after it: fw.getDocumentDOM().setOnionSkinning(2, 0); dom.setOpacity() Availability Fireworks 3. Usage dom.setOpacity(
  • Adobe 65011817 | Extended User Guide - Page 170
    207964599}, {x:1, y:0.792035401}, {x:-0.300884962, y:0.792035401}, "autoTrimImages transformAttributes"); dom.setRectRoundness() Availability Fireworks 4; modified in Fireworks 10. Usage dom.setRectRoundness(roundness, mode) Arguments roundness A floating-point value between 0 and 1 that specifies
  • Adobe 65011817 | Extended User Guide - Page 171
    Last updated 12/8/2009 EXTENDING FIREWORKS 167 The Document object See also dom.addNewRectanglePrimitive(), dom.setRectSides() dom.setRectRoundnessMode() Availability Fireworks 4. Usage dom.setRectRoundnessMode(mode) Arguments mode String that specifies the mode of corner roundness of the
  • Adobe 65011817 | Extended User Guide - Page 172
    Last updated 12/8/2009 EXTENDING FIREWORKS 168 The Document object dom.setSelectionBounds() Availability Fireworks 3. Usage dom.setSelectionBounds(boundingRectangle, opts) Arguments boundingRectangle A rectangle that specifies the new location and size of the selection (see "Rectangle data type"
  • Adobe 65011817 | Extended User Guide - Page 173
    Last updated 12/8/2009 EXTENDING FIREWORKS 169 The Document object Usage dom.setShowEdges(bShowEdges) Arguments bShowEdges Boolean. If true, the Show Edges option is turned on; if false, the option is turned off. Returns Nothing. Description Specifies whether the Show Edges option is on or off.
  • Adobe 65011817 | Extended User Guide - Page 174
    3. Usage dom.setShowGuides(bShow) Arguments bShow Boolean. If true, the normal guides are visible; if false, the normal guides are not visible. Returns Nothing. Description Specifies whether normal guides are visible. dom.setShowRulers() Availability Fireworks 3. Usage dom.setShowRulers(bShow
  • Adobe 65011817 | Extended User Guide - Page 175
    EXTENDING FIREWORKS 171 The Document object Returns Nothing. Description Specifies whether slice guides are visible. dom.setShowSliceOverlay() Availability Fireworks 3. Usage dom.setShowSliceOverlay(bShow) off for the slice. dom.setSliceType() Availability Fireworks 3; modified in Fireworks 10.
  • Adobe 65011817 | Extended User Guide - Page 176
    Last updated 12/8/2009 EXTENDING FIREWORKS 172 The Document object Usage dom.setSliceType(slicetype) Arguments slicetype Specifies the slice type as image (foreground image), background image, or empty (HTML Slice). Returns Nothing. Description Sets the slice type as image (foreground image),
  • Adobe 65011817 | Extended User Guide - Page 177
    string data type" on page 7). Returns Nothing. 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 htmlText
  • Adobe 65011817 | Extended User Guide - Page 178
    Specifies whether tools snap to the grid. dom.setSnapToGuides() Availability Fireworks 3. Usage dom.setSnapToGuides(bSnap) Arguments bSnap Boolean. If true, the tools snap to all guides; if false, they do not. Returns Nothing. Description Specifies whether tools snap to
  • Adobe 65011817 | Extended User Guide - Page 179
    Last updated 12/8/2009 EXTENDING FIREWORKS 175 The Document object dom.setSymbolProperties() Availability Fireworks 3; modified in Fireworks 9. Usage dom.setSymbolProperties(currentName, symbolType, newName, status) Arguments currentName A string value that specifies the current name of the symbol
  • Adobe 65011817 | Extended User Guide - Page 180
    Last updated 12/8/2009 EXTENDING FIREWORKS 176 The Document object Usage dom.setTextAntiAliasing(level) Arguments level Acceptable values are "crisp", "smooth", and "strong". Returns Nothing. Description Sets the anti-aliasing level for the selected blocks of text. See also dom.
  • Adobe 65011817 | Extended User Guide - Page 181
    Last updated 12/8/2009 EXTENDING FIREWORKS 177 The Document object Description Adjusts the kerning of text. dom.setTextCustomAntiAliasOverSample() Availability Fireworks MX 2004. Usage dom.setTextCustomAntiAliasOverSample(overSample) Arguments overSample The integer 4, 8 or 16 that specifies the
  • Adobe 65011817 | Extended User Guide - Page 182
    Last updated 12/8/2009 EXTENDING FIREWORKS 178 The Document object Arguments Strength An integer value, from 0 to 255, for the amount of anti-aliasing to apply. Returns Nothing. Description Sets the strength value used to anti-alias text in custom mode. dom.setTextFlow() Availability Fireworks 3.
  • Adobe 65011817 | Extended User Guide - Page 183
    Last updated 12/8/2009 EXTENDING FIREWORKS 179 The Document object dom.setTextLeading() Availability Fireworks MX. Usage dom.setTextLeading(leadingValue, leadingMode) Arguments leadingValue A floating-point number that determines the spacing between two lines of text. The meaning of leadingValue
  • Adobe 65011817 | Extended User Guide - Page 184
    Last updated 12/8/2009 EXTENDING FIREWORKS 180 The Document object Arguments offset A floating-point value that specifies the offset distance, in pixels. Returns Nothing. Description Sets the offset value between the items in the selected text-on-a-path. dom.setTextOrientation() Availability
  • Adobe 65011817 | Extended User Guide - Page 185
    Last updated 12/8/2009 EXTENDING FIREWORKS 181 The Document object dom.setTextParaSpacingAfter() Availability Fireworks MX. Usage dom.setTextParaSpacingAfter(paraSpaceAfter) Arguments paraSpaceAfter The number of pixels to place after a paragraph before starting the next paragraph. Returns Nothing
  • Adobe 65011817 | Extended User Guide - Page 186
    Last updated 12/8/2009 EXTENDING FIREWORKS 182 The Document object Arguments textRuns A TextRuns object (see "TextRuns object" on page 268). Returns Nothing. Description Replaces the text in the selected text blocks with the styled text that is described by the TextRunsobject passed in the
  • Adobe 65011817 | Extended User Guide - Page 187
    Last updated 12/8/2009 EXTENDING FIREWORKS 183 The Document object dom.setTextRectangleAuto() Availability Fireworks 3. Usage dom.setTextRectangleAuto() Arguments None. Returns Nothing. Description Recalculates the bounding rectangle of the selected text item, setting the rectangle to the smallest
  • Adobe 65011817 | Extended User Guide - Page 188
    Last updated 12/8/2009 EXTENDING FIREWORKS 184 The Document object dom.setWebObjectsVisibility() Availability Fireworks CS3. Usage dom.setWebObjectsVisibility(value) Arguments value A Boolean value that specifies the visibility of web objects. If the value is true, the web objects are visible. If
  • Adobe 65011817 | Extended User Guide - Page 189
    Last updated 12/8/2009 EXTENDING FIREWORKS 185 The Document object Arguments None. Returns Nothing. Description Shows all the items that were hidden through dom.hideSelection(). See also dom.hideSelection() dom.splitPaths() Availability Fireworks 3. Usage dom.splitPaths() Arguments None. Returns
  • Adobe 65011817 | Extended User Guide - Page 190
    Last updated 12/8/2009 EXTENDING FIREWORKS 186 The Document object dom.transformSelection() Availability Fireworks 3, updated in Fireworks 4. Usage dom.transformSelection(matrix, options) Arguments matrix A three-by-three transformation matrix (see "Matrix data type" on page 8). options Acceptable
  • Adobe 65011817 | Extended User Guide - Page 191
    actually able to be undone; meaning, if you use a command that contains multiple JavaScript instructions, then you can undo the command (all 10 JavaScript instructions) and not just one JavaScript instruction within that command. Most (but not all) JavaScript functions cause an action to be executed
  • Adobe 65011817 | Extended User Guide - Page 192
    Last updated 12/8/2009 EXTENDING FIREWORKS 188 The Document object Returns Nothing. Description Ungroups any grouped items in the selection. To group items, use dom.group(). See also dom.group() dom.unsetMasterPage() Availability Fireworks CS3. Usage dom.unsetMasterPage() Arguments None Returns
  • Adobe 65011817 | Extended User Guide - Page 193
    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 common API, so it also appears as app.appName (as implemented in Adobe Dreamweaver).
  • Adobe 65011817 | Extended User Guide - Page 194
    Last updated 12/8/2009 Property appPatternsDir • appPrefsDir appPresetsDir • Data type string string string appSettingsDir • appSmartShapesDir appSmartShapeToolsDir appStylesDir • string string string string appSwfCommandsDir appSymbolLibrariesDir • appTexturesDir • appXtrasDir •
  • Adobe 65011817 | Extended User Guide - Page 195
    to the Internet. The Start Page has a dynamic content panel that loads content from the Internet. The Start Page queries this property before attempting to download the dynamic content. Array of recent open files. If there are no open files, returns an array length of zero. Array of recent open file
  • Adobe 65011817 | Extended User Guide - Page 196
    Last updated 12/8/2009 EXTENDING FIREWORKS 192 The Fireworks Object Property textInsertionIndex • textInsertionLength • textOutputEncoding userJsCommandsDir Data type integer integer string string userSmartShapesDir • userSmartShapeToolsDir • userSymbolLibrariesDir • userSwfCommandsDir string
  • Adobe 65011817 | Extended User Guide - Page 197
    values are "open", "select", and "save". The first two values display an Open dialog box; each is acceptable for compatibility with Adobe Dreamweaver. The third value displays a Save dialog box. title and previewArea Ignored by Fireworks but are accepted for compatibility with Dreamweaver. Returns
  • Adobe 65011817 | Extended User Guide - Page 198
    () Availability Fireworks 3. Usage fw.checkFwJsVersion(version) Arguments version An integer that is reserved for future use; only a value of 0 is supported at this time. To use this function, put a call to fw.checkFwJsVersion(0) in your script. Returns Nothing. Description Checks the JavaScript
  • Adobe 65011817 | Extended User Guide - Page 199
    Last updated 12/8/2009 EXTENDING FIREWORKS 195 The Fireworks Object Arguments primaryBrowser A Boolean value that indicates which browser to select. If primaryBrowser is true, Fireworks prompts the user to set the primary browser; if the argument is false, Fireworks prompts the user to set the
  • Adobe 65011817 | Extended User Guide - Page 200
    Last updated 12/8/2009 EXTENDING FIREWORKS 196 The Fireworks Object Returns Nothing. Description Closes the specified document. fw.createDocument() Availability Fireworks 3. Usage fw.createDocument(). Arguments None. Returns The Document object for the newly created document (see "The Document
  • Adobe 65011817 | Extended User Guide - Page 201
    : fw.createFireworksDocument({x:500,y:500},{pixelsPerUnit:72,units:"inch"}, "#ffffff"); See also fw.createDocument() fw.currentWorkspaceName() Availability Fireworks 10. Usage fw.currentWorkspaceName() Arguments None. Returns The name of the current workspace layout. Description Returns the name of
  • Adobe 65011817 | Extended User Guide - Page 202
    .runEditGrids() Arguments None. Returns Opens the Edit Grids dialog box. fw.dialogs.runEditGuides() Availability Fireworks 3. Usage fw.dialogs.runEditGuides() Arguments None. Returns Opens the Edit Guides dialog box.
  • Adobe 65011817 | Extended User Guide - Page 203
    () 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 "fw.enableFlashDebugging()" on page 200. For more information about constructing
  • Adobe 65011817 | Extended User Guide - Page 204
    which commands are executed in a command panel. For information on how to turn off Flash debugging, see fw.disableFlashDebugging(). For more information about constructing Flash command panels for Fireworks, see "Flash panels" on page 292. Note: This debugging command works even if you are running
  • Adobe 65011817 | Extended User Guide - Page 205
    dialog box. Returns A Boolean value: true if successful; false otherwise. Description Exports the specified document to the specified file as layers to be imported into Adobe Director.
  • Adobe 65011817 | Extended User Guide - Page 206
    A Boolean value: true if successful; false otherwise. Description Exports the specified document to the specified file as Adobe Director images. fw.exportDocumentAs() Availability Fireworks 3. Usage fw.exportDocumentAs(document, fileURL, exportOptions) Arguments document A Document object, for
  • Adobe 65011817 | Extended User Guide - Page 207
    Last updated 12/8/2009 EXTENDING FIREWORKS 203 The Fireworks Object fw.exportFrames() Availability Fireworks 4. Usage fw.exportFrames(docObject, directoryURL) Arguments docObject A Document object that specifies the document that contains the frames to export (see "The Document object" on page 27
  • Adobe 65011817 | Extended User Guide - Page 208
    A Boolean value: true if successful; false otherwise. Description Exports the specified document to the specified file in Adobe Illustrator format. fw.exportLayers() Availability Fireworks 4. Usage fw.exportLayers(docObject, directoryURL) Arguments docObject A Document object that specifies the
  • Adobe 65011817 | Extended User Guide - Page 209
    Last updated 12/8/2009 EXTENDING FIREWORKS 205 The Fireworks Object Returns A Boolean value: true if successful; false otherwise. Description Exports a document's layers as individual images. The image names are based on the names in the Layers panel. The layers from the current frame are exported
  • Adobe 65011817 | Extended User Guide - Page 210
    Object fw.exportPDF() Availability Fireworks 10. Usage fw.exportPDF(doc, pdfURL document to the specified file in PDF format. fw.exportPSD() Availability Fireworks the current document, pass null. PSDDocumentURL The name of the Photoshop document to be created, which is expressed as a file
  • Adobe 65011817 | Extended User Guide - Page 211
    expressed as a file://URL. Returns A Boolean value: true if successful; false otherwise. Description Exports a Fireworks document as a Adobe Flash document. Example The Adobe Flash writer is controlled by the values of several preferences. See the following example for allowed values. A well-behaved
  • Adobe 65011817 | Extended User Guide - Page 212
    Last updated 12/8/2009 EXTENDING FIREWORKS 208 The Fireworks Object var prevMaintainObjEditable = fw.getPref("SwfMaintainObjEditable"); fw.setPref("SwfMaintainObjEditable", true); // maintain non-text editability //at expense of appearance or not var prevMaintainTextEditable = fw.getPref("
  • Adobe 65011817 | Extended User Guide - Page 213
    Last updated 12/8/2009 EXTENDING FIREWORKS 209 The Fireworks Object 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
  • Adobe 65011817 | Extended User Guide - Page 214
    Last updated 12/8/2009 EXTENDING FIREWORKS 210 The Fireworks Object Description Determines whether the specified file is open in a Fireworks Document window. fw.getBlue() Availability Fireworks MX. Usage fw.getBlue(color) Arguments color RGB value of the color. Returns The hex value of blue color
  • Adobe 65011817 | Extended User Guide - Page 215
    if it has not been saved. Description Gets the path and filename of the specified document. fw.getFamilyNameForPSFont() Availability Fireworks 10. Usage fw.getFamilyNameForPSFont(font) Arguments font Name of the PostScript font. Returns The family name of the specified PostScript font. Description
  • Adobe 65011817 | Extended User Guide - Page 216
    Last updated 12/8/2009 EXTENDING FIREWORKS 212 The Fireworks Object Note: Any panels not specified in the list of valid arguments (like those in the Command Panels folder which are "outside" the Fireworks application) should be named exactly as they appear in the file system without their file
  • Adobe 65011817 | Extended User Guide - Page 217
    Last updated 12/8/2009 EXTENDING FIREWORKS 213 The Fireworks Object Note: Any panels not specified in the list of valid arguments (like those in the Command Panels folder which are "outside" the Fireworks application) should be named exactly as they appear in the file system without their file
  • Adobe 65011817 | Extended User Guide - Page 218
    Last updated 12/8/2009 fw.getHTMLFileForScript() Availability Fireworks MX. Usage fw.getHTMLFileForScript() Arguments None. Returns A file URL. Description Returns an HTML file. fw.getNumberOfTables() Availability Fireworks MX. Usage fw.getNumberOfTables(filename) Arguments filename The name of the
  • Adobe 65011817 | Extended User Guide - Page 219
    Last updated 12/8/2009 EXTENDING FIREWORKS 215 The Fireworks Object Returns Platform name of the PostScript font. Description Returns the platform name of the PostScript font. fw.getPref() Availability Fireworks 3. Usage fw.getPref(prefkey) Arguments prefkey A string that specifies the Preference
  • Adobe 65011817 | Extended User Guide - Page 220
    Last updated 12/8/2009 EXTENDING FIREWORKS 216 The Fireworks Object fw.getStyleNameForPSFont() Availability Fireworks CS4. Usage fw.getStyleNameForPSFont(font) Arguments font Name of the PostScript font. Returns The style name of the specified PostScript font. Description Returns the style name of
  • Adobe 65011817 | Extended User Guide - Page 221
    to open in the primary web browser. Returns Nothing. Example The following command starts a browser that opens to the Adobe website: fw.launchBrowserTo("http://www.Adobe.com"); Description Starts Fireworks' primary web browser to open a URL. fw.locateDocDialog() Availability Fireworks 4. Usage fw
  • Adobe 65011817 | Extended User Guide - Page 222
    kMoaCfFormat_JPEG" "kMoaCfFormat_PICT" "kMoaCfFormat_RTF" "kMoaCfFormat_Text" "kMoaCfFormat_TIFF" "PNG" "PS30" File type Adobe Illustrator Fireworks JSF Bitmap Adobe FreeHand 7 or 8 GIF JPEG Macintosh PICT Rich text Plain text TIFF PNG Photoshop PSD Returns An array of file:// URLs, or null if the
  • Adobe 65011817 | Extended User Guide - Page 223
    Last updated 12/8/2009 EXTENDING FIREWORKS 219 The Fireworks Object Returns RGB pixel value. Description Combines the individual hex values into a single RGB value. fw.moveFocusToDoc() Availability Fireworks 8. Usage fw.moveFocusToDoc() Arguments None. Returns Nothing. Description Moves the
  • Adobe 65011817 | Extended User Guide - Page 224
    Last updated 12/8/2009 EXTENDING FIREWORKS 220 The Fireworks Object Description Opens the specified files in new document windows. If a file is already open, it opens again; to avoid redundant open operations, call findOpenDocument() first. See also fw.findOpenDocument() fw.openMultiDocument()
  • Adobe 65011817 | Extended User Guide - Page 225
    Last updated 12/8/2009 EXTENDING FIREWORKS 221 The Fireworks Object Returns The specified color in #rrggbbaa format (for syntax details, see "Color string data type" on page 7). Description Opens the pop-up color swatches dialog box to let the user select a color. fw.popupColorPickerOverMouse()
  • Adobe 65011817 | Extended User Guide - Page 226
    Last updated 12/8/2009 EXTENDING FIREWORKS 222 The Fireworks Object fw.quitApplication() Availability Fireworks 3. Usage fw.quitApplication() Arguments None. Returns Nothing. Description Quits Fireworks, but prompts the user to save any changed documents before exiting. fw.readNthTable()
  • Adobe 65011817 | Extended User Guide - Page 227
    Last updated 12/8/2009 EXTENDING FIREWORKS 223 The Fireworks Object Returns Nothing. Description Reads in a panel state file, which is generated by fw.writePanelStateToFile(), and moves the panels, Property inspector, and toolbox to the appropriate locations. fw.reloadCommonLibrary() Availability
  • Adobe 65011817 | Extended User Guide - Page 228
    Last updated 12/8/2009 EXTENDING FIREWORKS 224 The Fireworks Object fw.replaceAll() Availability Fireworks 3. Usage fw.replaceAll() Arguments None. Returns The number of items replaced, or -1 if the search is not yet complete. Description Performs a replace all operation on the active document
  • Adobe 65011817 | Extended User Guide - Page 229
    Last updated 12/8/2009 EXTENDING FIREWORKS 225 The Fireworks Object Arguments document A Document object, for example, fw.documents[2], that specifies the document to be reverted. This argument is optional. If document is omitted or null, the active document is reverted. Returns Nothing.
  • Adobe 65011817 | Extended User Guide - Page 230
    Saves all open documents, displaying the Save As dialog box for any documents that were not previously saved. fw.saveAs() Availability Fireworks 10. Usage fw.saveAs(doc, url, defaultfromoptions) Arguments doc The document object (for example, fw.documents[2]) that specifies the document to be saved
  • Adobe 65011817 | Extended User Guide - Page 231
    Last updated 12/8/2009 EXTENDING FIREWORKS 227 The Fireworks Object See also fw.exportDocumentAs() fw.saveDocumentAs() Availability Fireworks 3. Usage fw.saveDocumentAs(document) Arguments document A Document object, for example, fw.documents[2], that specifies the document to save. If document is
  • Adobe 65011817 | Extended User Guide - Page 232
    Last updated 12/8/2009 EXTENDING FIREWORKS 228 The Fireworks Object See also fw.exportDocumentAs() fw.saveJsCommand() Availability Fireworks 3. Usage fw.saveJsCommand(jscode, filename) Arguments jscode The string of code to be saved as a JSF command file. filename The name under which the file
  • Adobe 65011817 | Extended User Guide - Page 233
    Last updated 12/8/2009 EXTENDING FIREWORKS 229 The Fireworks Object Usage fw.setActiveWindow(document, {trueFalse}) Arguments document A Document object, for example, fw.documents[2], that specifies which document should be made active. trueFalse This optional argument is ignored by Fireworks. It
  • Adobe 65011817 | Extended User Guide - Page 234
    Last updated 12/8/2009 EXTENDING FIREWORKS 230 The Fireworks Object Example The following command moves the Stroke tab from its current location into the panel named Object. Although the panel name might be capitalized onscreen, it must be passed as lowercase. fw.setFloaterGrouping("stroke", "
  • Adobe 65011817 | Extended User Guide - Page 235
    Last updated 12/8/2009 EXTENDING FIREWORKS 231 The Fireworks Object Note: Any panels not specified in the list of valid arguments (such as those in the Command Panels folder, which are "outside" the Fireworks application) should be named exactly as they appear in the file system without their file
  • Adobe 65011817 | Extended User Guide - Page 236
    Last updated 12/8/2009 EXTENDING FIREWORKS 232 The Fireworks Object Description Sets the value that is associated with the specified Preference key. See also "fw.getPref()" on page 215 fw.setUpFindReplace() Availability Fireworks 3. Usage fw.setUpFindReplace(findSpec) Arguments findSpec A Find
  • Adobe 65011817 | Extended User Guide - Page 237
    Last updated 12/8/2009 EXTENDING FIREWORKS 233 The Fireworks Object Description Shows or hides the specified panel, or makes it topmost. • If the panel is hidden, this function shows it and makes it topmost. • If the panel is topmost, this function hides it. • If the panel is shown but is not
  • Adobe 65011817 | Extended User Guide - Page 238
    Last updated 12/8/2009 EXTENDING FIREWORKS 234 The Fireworks Object bRecoverFromError If bRecoverFromError is true and the HTML update encounters an error, Fireworks displays a Confirmation dialog box and attempts to recover. If it is false, Fireworks fails without notifying the user if it
  • Adobe 65011817 | Extended User Guide - Page 239
    Last updated 12/8/2009 EXTENDING FIREWORKS 235 The Fireworks Object Returns A Boolean value: true if the user selected the Yes button; false otherwise. Description Displays a dialog box that contains buttons labeled Yes and No. Example The following code displays a dialog box with Yes and No
  • Adobe 65011817 | Extended User Guide - Page 240
    Last updated 12/8/2009 236 Chapter 5: Objects within Fireworks documents This chapter describes the objects that can get or set the properties of elements in a Fireworks document. For syntax on accessing Fireworks documents and elements within them, see "Accessing a Fireworks document" on page 6
  • Adobe 65011817 | Extended User Guide - Page 241
    Last updated 12/8/2009 Property dashOnSize1, dashOnSize2, dashOnSize3 diameter feedback flowRate maxCount minSize name numDashes sense_hdir_angle Data type integer integer string float integer float string integer float sense_hdir_blackness sense_hdir_hue sense_hdir_lightness sense_hdir_opacity
  • Adobe 65011817 | Extended User Guide - Page 242
    Last updated 12/8/2009 Property sense_random_size sense_speed_angle sense_speed_blackness sense_speed_hue sense_speed_lightness sense_speed_opacity sense_speed_saturation sense_speed_scatter sense_speed_size sense_vdir_angle sense_vdir_blackness sense_vdir_hue sense_vdir_lightness
  • Adobe 65011817 | Extended User Guide - Page 243
    Last updated 12/8/2009 EXTENDING FIREWORKS 239 Objects within Fireworks documents 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 isClosed nodes Data type Boolean array
  • Adobe 65011817 | Extended User Guide - Page 244
    Last updated 12/8/2009 EXTENDING FIREWORKS 240 Objects within Fireworks documents Method RegisterMove() Parameter object RegisterLinearMove() point object RegisterCircularMove() point object RegisterPolygonMove() point object Definition The RegisterMoveParms object containing the move
  • Adobe 65011817 | Extended User Guide - Page 245
    Last updated 12/8/2009 EXTENDING FIREWORKS 241 Objects within Fireworks documents Property toolTipTracksDrag type visible x y Data type Boolean string Boolean float float Notes If true, the tooltip drags with the mouse. Determines the way the control point draws. Values are: "default", "
  • Adobe 65011817 | Extended User Guide - Page 246
    Last updated 12/8/2009 Bevel object Property AngleSoftness BevelContrast BevelType Data type integer integer integer BevelWidth ButtonState integer integer DownBlendColor EdgeThreshold EffectIsVisible EffectMoaID EmbossFaceColor GlowStartDistance GlowWidth HiliteColor string integer Boolean
  • Adobe 65011817 | Extended User Guide - Page 247
    Last updated 12/8/2009 Property OuterBevelColor ShadowColor Data type string string ShowObject SlopeMultiplier SlopeType Boolean float integer Blur object Property EffectMoaID EffectIsVisible Data type string Boolean Blur More object Property EffectIsVisible EffectMoaID Data type Boolean
  • Adobe 65011817 | Extended User Guide - Page 248
    Last updated 12/8/2009 Convert to Alpha object Property EffectIsVisible Data type Boolean EffectMoaID string Curves object Property EffectIsVisible EffectMoaID rgb_points Data type Boolean string vector of points red_points green_points blue_points Drop Shadow object Property
  • Adobe 65011817 | Extended User Guide - Page 249
    Last updated 12/8/2009 Gaussian Blur object Property EffectIsVisible Data type Boolean EffectMoaID gaussian_blur_radius string float Hue/Saturation object Property EffectIsVisible Data type Boolean EffectMoaID hue_amount string integer saturation_amount integer lightness_amount
  • Adobe 65011817 | Extended User Guide - Page 250
    all output levels to the filter, with values of 0 to 255. These gamma* values are all gamma levels to the filter, with values of 0.1 to 10.0.< Notes "{c20952b1-fc76-11d0-8be700a024cdc039}" If set to false, the effect is included but temporarily hidden. The default value is true.
  • Adobe 65011817 | Extended User Guide - Page 251
    Last updated 12/8/2009 Sharpen More object Property EffectMoaID EffectIsVisible Data type string Boolean Unsharp Mask object Property EffectMoaID EffectIsVisible Data type string Boolean unsharp_mask_amount unsharp_mask_radius unsharp_mask_threshold integer float integer EXTENDING FIREWORKS
  • Adobe 65011817 | Extended User Guide - Page 252
    Last updated 12/8/2009 EXTENDING FIREWORKS 248 Objects within Fireworks documents Property height • isLayer isSmartShape • left mask name opacity rawLeft rawTop top pixelRect visible width • Data type float Boolean Boolean float object string float float float float rect Boolean float Notes Read
  • Adobe 65011817 | Extended User Guide - Page 253
    Last updated 12/8/2009 EXTENDING FIREWORKS 249 Objects within Fireworks documents Property groupType smartShapeCode transformMode Data type string string string Notes Acceptable value is "normal". ("mask to image" and "mask to path" were deprecated in Fireworks MX.) The body of code in the
  • Adobe 65011817 | Extended User Guide - Page 254
    Last updated 12/8/2009 EXTENDING FIREWORKS 250 Objects within Fireworks documents Property altText instanceType • symbolID • symbolName targetText transform transformMode urlText Data type string string string string string Matrix string string Notes The alternate text description. The type of
  • Adobe 65011817 | Extended User Guide - Page 255
    Last updated 12/8/2009 EXTENDING FIREWORKS 251 Objects within Fireworks documents Property sliceID • sliceKind tdTagText Data type string string string Notes An arbitrary string that uniquely identifies this slice. If set to "image", generates an image; if set to "empty", generates the text
  • Adobe 65011817 | Extended User Guide - Page 256
    Last updated 12/8/2009 EXTENDING FIREWORKS 252 Objects within Fireworks documents Property textRuns textureOffset transformMode rawTop rawLeft rawWidth rawHeight Data type object point string float float float float Notes TextRuns object (for more information, see "TextRuns object" on page 268).
  • Adobe 65011817 | Extended User Guide - Page 257
    Last updated 12/8/2009 EXTENDING FIREWORKS 253 Objects within Fireworks documents Property mode owner showAttrs Data type string object Boolean Notes Acceptable values are "mask to image" and "mask to path". The element (image, path, text, and so on) that owns the mask. If set to true, and mode
  • Adobe 65011817 | Extended User Guide - Page 258
    Last updated 12/8/2009 EXTENDING FIREWORKS 254 Objects within Fireworks documents - xSize < 0, ySize = 0 - use xSize scaling - xSize < 0, ySize > 0 - use ySize scaling - xSize = 0, ySize < 0 - use ySize scaling - xSize = 0, ySize = 0 - illegal; use scale of 1.0 - xSize = 0, ySize > 0 - use ySize
  • Adobe 65011817 | Extended User Guide - Page 259
    Last updated 12/8/2009 EXTENDING FIREWORKS 255 Objects within Fireworks documents Property name numCustomEntries numEntriesRequested numGridEntries optimized paletteEntries paletteInfo Data type string integer integer integer Boolean array array paletteMode string paletteTransparencyType
  • Adobe 65011817 | Extended User Guide - Page 260
    "Director HTML""CSS Layers""Layers to Files""Frames to Files""Lotus Domino""Adobe Flash SWF" "Illustrator""Photoshop" Defines the extension to append to the filename. If set to tables" (no shims, but nested tables). If set to true, use guides for slicing (and sliceUsingUrls should be set to false).
  • Adobe 65011817 | Extended User Guide - Page 261
    Last updated 12/8/2009 Property sliceAutoNaming1 throughsliceAutoNaming6 Data type string EXTENDING FIREWORKS 257 Objects within Fireworks documents Notes Used to generate a name by concatenating six strings. If you need fewer than six strings, fill in the remaining strings with "none".
  • Adobe 65011817 | Extended User Guide - Page 262
    Last updated 12/8/2009 EXTENDING FIREWORKS 258 Objects within Fireworks documents Property sliceFrameNaming1 and sliceFrameNaming2 Data type string sliceUsingUrls templateName Boolean string Notes Used to generate a name by concatenating two strings; the resulting string is concatenated to the
  • Adobe 65011817 | Extended User Guide - Page 263
    Last updated 12/8/2009 EXTENDING FIREWORKS 259 Objects within Fireworks documents Property stampingMode textureBlend webDitherTransparent Data type string float Boolean Notes Acceptable values are "blend" and "blend opaque". 0 to 100 If set to true (and shape is set to "web dither"), then the
  • Adobe 65011817 | Extended User Guide - Page 264
    data type" on page 7). If set to true, this node is part of the gradient's opacity ramp. 0.0 to 1.0 Guides object The following table lists the properties of the Guides object, along with their data types and, where appropriate, acceptable values and notes. Property color hGuides locked vGuides
  • Adobe 65011817 | Extended User Guide - Page 265
    Last updated 12/8/2009 EXTENDING FIREWORKS 261 Objects within Fireworks documents 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 (•).
  • Adobe 65011817 | Extended User Guide - Page 266
    Last updated 12/8/2009 EXTENDING FIREWORKS 262 Objects within Fireworks documents Pattern object The following table lists the property of the Pattern object, along with its data type and notes. Property name Data type string Notes The name that appears in the Fill panel. RectanglePrimitive
  • Adobe 65011817 | Extended User Guide - Page 267
    Last updated 12/8/2009 Property constrainXKey Data type string constrainY constrainYKey constrain45Key string constrain90Key string deltaLinearToLinear float deltaRtoR float deltaShortestSideToX deltaShortestSideToY deltaLongestSideToX deltaLongestSideToY deltaXtoX float float float
  • Adobe 65011817 | Extended User Guide - Page 268
    Last updated 12/8/2009 Property deltaXtoY deltaYtoX deltaYtoY Data type float float float disableRotateKey string incrementRadius incrementX incrementY maxAngle maxLinear maxRadius maxX maxY minAngle minLinear minMaxRelative minX minY minRadius movePred float float float point float float
  • Adobe 65011817 | Extended User Guide - Page 269
    Last updated 12/8/2009 EXTENDING FIREWORKS 265 Objects within Fireworks documents Property movePt moveSucc rotate Data type Boolean Boolean Boolean Notes Determines whether the point itself should be moved as the user moves the mouse. Determines whether the successor point should be moved as the
  • Adobe 65011817 | Extended User Guide - Page 270
    Last updated 12/8/2009 EXTENDING FIREWORKS 266 Objects within Fireworks documents Property livePreview mouseDownPos • operation • prevMousePos • shiftKeyDown • Data type Boolean point string point Boolean Notes Sets live preview. A value of true enables live preview, and disables wire-frame
  • Adobe 65011817 | Extended User Guide - Page 271
    Last updated 12/8/2009 EXTENDING FIREWORKS 267 Objects within Fireworks documents Property (read-only) use_brushColor use_effectList use_fill use_fillColor use_textFont use_textSize use_textStyles Data type Boolean Boolean Boolean Boolean Boolean Boolean Boolean Notes If set to true, applies the
  • Adobe 65011817 | Extended User Guide - Page 272
    Last updated 12/8/2009 EXTENDING FIREWORKS 268 Objects within Fireworks documents Property kerning leading leadingMode rangeKerning size underline Data type float float string float string Boolean Notes Also known as pair kerning, kerning specifies the percentage of an em square by which to
  • Adobe 65011817 | Extended User Guide - Page 273
    true for bold text, false for normal text. The name of the font, such as Arial. The size of the font in points, such as 10. Acceptable values are "left", "center", "right", "justify", and "stretch". The following table lists a method of the Widget object, along with its parameters. Method
  • Adobe 65011817 | Extended User Guide - Page 274
    Last updated 12/8/2009 270 Chapter 6: HTML export objects Fireworks provides several object types that support the output of HTML and sliced images from Fireworks. These objects let you write JavaScript scripts that create templates to output the type of HTML
  • Adobe 65011817 | Extended User Guide - Page 275
    Last updated 12/8/2009 Property (read-only) dhTargetFrame downHighlight event Data type integer Boolean integer groupChecked groupName hasDhTargetFrame hasDhHref hasHref hasStatusText hasTargetFrame hideTimeout hideOnMouseout hiliteColor horzOffset horzSubmenuOffset href menuFontFamily menuHeight
  • Adobe 65011817 | Extended User Guide - Page 276
    Last updated 12/8/2009 Property (read-only) menuItemPadding menuItemSpacing menuWidth objectName opaqueBackground overrideMenuHeight overrideMenuWidth preload restoreOnMouseout shadowColor soundFileName statusText submenuRelativeToItem targetColumnNum targetFrameNum targetRowNum targetTable
  • Adobe 65011817 | Extended User Guide - Page 277
    Last updated 12/8/2009 EXTENDING FIREWORKS 273 HTML export objects Property (read-only) textOverColor textSize textUpColor vertical vertOffset vertSubmenuOffset Data type string integer string Boolean integer integer Notes If action is set to 9 (Popup Menu), specifies the menu text color for the
  • Adobe 65011817 | Extended User Guide - Page 278
    Last updated 12/8/2009 Property (read-only) backgroundRepeat backgroundURL bottomMargin cssPopupMenus docAlignment docID Data type string string long Boolean string integer docSaveFolder docSaveName documentXHTMLFormat string string Boolean emptyCellColor emptyCellContents
  • Adobe 65011817 | Extended User Guide - Page 279
    Last updated 12/8/2009 Property (read-only) htmlOutputPath imagename includeHTMLComments isBackground leftMargin numFrames pagename pathBase pathSuffix rightMargin serverMap startColumn startRow style symbols tableAlignment Data type string string Boolean Boolean long integer string string string
  • Adobe 65011817 | Extended User Guide - Page 280
    Last updated 12/8/2009 EXTENDING FIREWORKS 276 HTML export objects ImageMap object The following table lists the properties and methods of the ImageMap object, along with their data types and, where appropriate, acceptable values and notes. All ImageMap object properties are read-only. Property
  • Adobe 65011817 | Extended User Guide - Page 281
    Last updated 12/8/2009 EXTENDING FIREWORKS 277 HTML export objects SliceInfo object The following table lists the properties and methods of the SliceInfo object, along with their data types and, where appropriate, acceptable values and notes. All SliceInfo object properties are read-only.
  • Adobe 65011817 | Extended User Guide - Page 282
    Last updated 12/8/2009 Property (read-only) or method href htmlText imagemap imageSuffix isBackground isUndefined Data type string string object string Boolean Boolean left nestedTableSlices integer object rowSpan setFrameFileName (frameIndex) integer zero-based index skipCell tableAlign
  • Adobe 65011817 | Extended User Guide - Page 283
    Last updated 12/8/2009 EXTENDING FIREWORKS 279 HTML export objects Slices object Slices is an object that has some properties and is also a two-dimensional array of SliceInfo objects (see "SliceInfo object" on page 277). For example, Slices[0][0] is the slice information for the first cell at row
  • Adobe 65011817 | Extended User Guide - Page 284
    Last updated 12/8/2009 Property (read-only) shimPath tableNested width Data type string Boolean string EXTENDING FIREWORKS 280 HTML export objects Notes Relative URL to the shim GIF file; for example, "images/shim.gif". Specifies if the table is nested. Specifies the slice width.
  • Adobe 65011817 | Extended User Guide - Page 285
    those applications as well as custom Fireworks panels developed in Adobe Flash to enhance the functionality of Fireworks. For example, a developer Applications written with Flash ActionScript 2.0 or C++ applications can control Fireworks by sending JavaScript instructions, called remote procedure
  • Adobe 65011817 | Extended User Guide - Page 286
    Extensions Fireworks RPC transactions pass XML between an RPC client and the Fireworks RPC server built in to Fireworks. The RPC client is any supported program that connects to Fireworks through a TCP stream on port 12124. The Fireworks RPC server is the internal code that listens on TCP port
  • Adobe 65011817 | Extended User Guide - Page 287
    Last updated 12/8/2009 EXTENDING FIREWORKS 283 Cross-Product Extensions • The set operation sets the object properties. The set operation can contain only the obj and name attributes and exactly one parameter. The parameter must be the same data type as the data type of the property being set, or
  • Adobe 65011817 | Extended User Guide - Page 288
    Last updated 12/8/2009 EXTENDING FIREWORKS 284 Cross-Product Extensions Data node The data node is the most important type of XML node in RPC. Methods called through the func operation need to act on actual data or references to server objects identified in data nodes. The data nodes are used as
  • Adobe 65011817 | Extended User Guide - Page 289
    of a given class of objects beforehand. If the client is written in ActionScript or C++, then the client can use the generated client stubs provided by Adobe. Client stubs generated by Adobe know about all methods and properties of every class accessible through RPC. These stubs are available for
  • Adobe 65011817 | Extended User Guide - Page 290
    FIREWORKS 286 Cross-Product Extensions Generating stubs for nonstandard client types If the client is not written in one of the languages for which Adobe provides a client RPC library, the client implementer must create or generate the stubs. For information about how to do this, see "The Fireworks
  • Adobe 65011817 | Extended User Guide - Page 291
    Last updated 12/8/2009 EXTENDING FIREWORKS 287 Cross-Product Extensions DOM data type matrix null object point rect resolution RPC data type dictionary null server object, or dictionary dictionary dictionary dictionary Example Description A
  • Adobe 65011817 | Extended User Guide - Page 292
    from the server. RPCMethods class To use remote procedure calls, Flash developers need to create an instance of a Fireworks object and thereafter are defined in the supporting RPCMethods.as stubs file available for download from the Adobe website at www.adobe.com/go/fireworks_documentation. Note
  • Adobe 65011817 | Extended User Guide - Page 293
    Last updated 12/8/2009 EXTENDING FIREWORKS 289 Cross-Product Extensions 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
  • Adobe 65011817 | Extended User Guide - Page 294
    you want to access a proxy object outside of an auto-release block, you must use the RemoveFromAutoReleasePool() function. The RemoveFromAutoReleasePool() function manually removes an object reference from the auto-release pool before exiting the auto-release block. In this example, the reference to
  • Adobe 65011817 | Extended User Guide - Page 295
    Flash application is clicked. To build a Flash application that uses RPC to create a Fireworks object: 1 Download the supporting ActionScript stub files (a series of supporting ActionScript files) from the Adobe object the short way var rect = {left:10, top:10, right:210, bottom:210}; //Add Rectangle
  • Adobe 65011817 | Extended User Guide - Page 296
    200 x 200 pixel green rectangle in Fireworks: Flash panels Fireworks contains Adobe Flash Player, which plays Shockwave files as panels and Adobe Flash (download the API wrapper from the Adobe website at www.adobe.com/go/fireworks_documentation). You can construct these Adobe Flash animations
  • Adobe 65011817 | Extended User Guide - Page 297
    supports a Command Panels folder inside of each user's Configuration folder, so users can save favorite panels. At runtime, Fireworks starts Flash Player the following functions. These functions communicate directly with Adobe Flash Player, which is distributed with Fireworks. MMExecute() Usage
  • Adobe 65011817 | Extended User Guide - Page 298
    the MMExecute() and MMEndCommand() functions or to be used in conjunction with them. After it is installed, the API wrapper appears in the Adobe Flash interface. This wrapper simplifies the writing of Fireworks commands. Instead of having to embed every Fireworks function in MMExecute(), you can use
  • Adobe 65011817 | Extended User Guide - Page 299
    handler, implement a function with the corresponding event name. Currently, Fireworks supports the following events for Flash panels: Event onFwStartMovie onFwStopMovie onFwUnitsChange onFwPICollapseOrExpand onFwDocumentNameChange onFwCurrentFrameChange onFwCurrentLayerChange onFwHistoryChange
  • Adobe 65011817 | Extended User Guide - Page 300
    will only work if the assignment executes before or during the onFwStartMovie handler. Publishing When testing your script, use the File > Publish menu option in Adobe Flash. The Shockwave file is in the same place as the FLA file after publishing.
  • Adobe 65011817 | Extended User Guide - Page 301
    hide everything that the Shockwave file passes to the Fireworks API during execution. Place these debug functions around the suspect code in your Adobe Flash ActionScript to turn the debugging functions on or off as needed. Be careful to use these functions only around "suspect" code; otherwise, you
  • Adobe 65011817 | Extended User Guide - Page 302
    about using Auto Shapes on the Fireworks Developer Center at www.adobe.com/go/fireworks_devnet. How Auto Shapes work You can define an including open and closed paths and text (currently, nested Auto Shapes are not supported). An Auto Shape can control a bitmap that has been imported into the
  • Adobe 65011817 | Extended User Guide - Page 303
    Last updated 12/8/2009 EXTENDING FIREWORKS 299 Auto Shapes Defining the shape The following code creates the initial shape, a rectangle (a more concise way of creating an initial shape follows this example): function InsertSmartShapeAt() { smartShape.elem.elements[0] = new Path; smartShape.elem.
  • Adobe 65011817 | Extended User Guide - Page 304
    Last updated 12/8/2009 EXTENDING FIREWORKS 300 Auto Shapes You can then simplify the InsertSmartShapeAt() function with the new helper function: function InsertSmartShapeAt() { var elem = smartShape.elem; var newPath = new Path; elem.elements[0] = newPath; newPath.contours[0] = new Contour; var
  • Adobe 65011817 | Extended User Guide - Page 305
    Last updated 12/8/2009 EXTENDING FIREWORKS 301 Auto Shapes Fireworks sends this message every time the mouse moves during a drag operation (as long as smartshape.getsDragEvents is set to true). For more information, see "SmartShape object" on page 265. • "EndDragInsert" Fireworks sends this
  • Adobe 65011817 | Extended User Guide - Page 306
    Last updated 12/8/2009 EXTENDING FIREWORKS 302 Auto Shapes Function BeginDragControlPoint() Description Tells Fireworks what to do when the user clicks and holds the mouse button on a control point. Fireworks can change the object as the user moves the mouse (for example, using the RegisterMove
  • Adobe 65011817 | Extended User Guide - Page 307
    by your shape. You can also invoke a single function for several messages: case "BeginDragInsert": case "InsertSmartShapeAt": InsertSmartShapeAt(true); break; Supporting functions and methods Because the Auto Shape file is written in JavaScript, your functions can use global variables, common
  • Adobe 65011817 | Extended User Guide - Page 308
    rich symbol, a PNG file is saved by default in the \Application Data\Adobe\Fireworks CS4\Common Library\Custom Symbols folder (Windows), or /Application Support/Adobe/FireworksCS4/Common Library/Custom Symbols (Macintosh). To create a rich symbol, a JavaScript file must be
  • Adobe 65011817 | Extended User Guide - Page 309
    how the .JSF file can be used to customize symbol properties, explore the sample components that have been included with the software. Supported attributes for rich symbols The following attributes are available in the Create Symbol Script panel (Commands > Create Symbol Script) for customizing rich
  • Adobe 65011817 | Extended User Guide - Page 310
    Last updated 12/8/2009 Attributes element.left element.width element.height element.pixelRect element.visible element.opacity element.blendmode element.effectList element.name element.mask element.pathattrs.burshColor element.pathattrs.fillColor element.pathattrs.brush element.pathattrs.fill element
  • Adobe 65011817 | Extended User Guide - Page 311
    Last updated 12/8/2009 Attributes element.pathattrs.fill.webDitherTransparent element.pathattrs.fill.shape element.pathattrs.fill.gradient element.pathattrs.fill.pattern element.pathattrs.fill.gradient.name element.pathattrs.fill.gradient.nodes element.pathattrs.fill.gradient.opacityNodes element.
  • Adobe 65011817 | Extended User Guide - Page 312
    Last updated 12/8/2009 Attributes element.pathattrs.brush.tipSpacingMode element.pathattrs.brush.tipColoringMode element.pathattrs.brush.numDashes element.pathattrs.brush.dashOnSize1 element.pathattrs.brush.dashOffSize1 element.pathattrs.brush.dashOnSize2 element.pathattrs.brush.dashOffSize2 element
  • Adobe 65011817 | Extended User Guide - Page 313
    the application user interface elements and use ActionScript for client logic and procedural control. Developers write MXML and ActionScript source code using the Adobe Flex Builder™ IDE or a standard text editor. MXML is the XML-based language that developers use to lay out components in Flex
  • Adobe 65011817 | Extended User Guide - Page 314
    Last updated 12/8/2009 EXTENDING FIREWORKS 310 Rich symbols Format flexClassName = "WhichClass"; When this property is present in a Fireworks element, the MXML and Images export process exports the element as a specific MXML tag and not as an image. Its value indicates the tag name of the MXML
  • Adobe 65011817 | Extended User Guide - Page 315
    consists of values that will be added to the final width and height attributes of the MXML tag produced. Example sizeOffset = {width:10, height:10}; customValues Object. Contains custom name-value pairs that are available to the MXML export but not accessible as visible properties within Fireworks
  • Adobe 65011817 | Extended User Guide - Page 316
    Last updated 12/8/2009 EXTENDING FIREWORKS 312 Rich symbols attributeProperties Array. A list of property names that will become attributes in the exported MXML tag. By default, all rich symbol properties (defined as currentValues or customValues) are considered attribute properties. By defining
  • Adobe 65011817 | Extended User Guide - Page 317
    Star"; var classDef = new Object(); classDef.margin = {top:0, right:3, bottom:10, left:3}; classDef.padding = {top:30, right:10, bottom:10, left:10}; classDef.sizeOffset = {width:10, height:0}; classDef.customValues = {staticValue:"static"}; classDef.attributeProperties = ["staticValue", "name
  • Adobe 65011817 | Extended User Guide - Page 318
    Last updated 12/8/2009 EXTENDING FIREWORKS 314 Rich symbols Star
  • Adobe 65011817 | Extended User Guide - Page 319
    Last updated 12/8/2009 315 Chapter 10: Additional Fireworks Functions This chapter lists additional JavaScript functions supported by Adobe Fireworks that let you create useful Fireworks extensions and customized Fireworks menus. Almost any task that the user can accomplish in Fireworks with the
  • Adobe 65011817 | Extended User Guide - Page 320
    Last updated 12/8/2009 EXTENDING FIREWORKS 316 Additional Fireworks Functions Description Makes the Property inspector window invisible. fw.isPIExpanded() Availability Fireworks MX. Usage fw.isPIExpanded() Arguments None. Returns A Boolean value: true if expanded; false otherwise. Description
  • Adobe 65011817 | Extended User Guide - Page 321
    Last updated 12/8/2009 EXTENDING FIREWORKS 317 Additional Fireworks Functions Arguments None. Returns Nothing. Description Expands the Property inspector window. fw.shrinkPIWindow() Availability Fireworks MX. Usage fw.shrinkPIWindow() Arguments None. Returns Nothing. Description Minimizes the
  • Adobe 65011817 | Extended User Guide - Page 322
    Last updated 12/8/2009 EXTENDING FIREWORKS 318 Additional Fireworks Functions fw.getPIPosition() Availability Fireworks MX. Usage fw.getPIPosition() Arguments None. Returns A point object that is formatted as {x:float, y: float} (see "Point data type" on page 8 for syntax details), which contains
  • Adobe 65011817 | Extended User Guide - Page 323
    Last updated 12/8/2009 EXTENDING FIREWORKS 319 Additional Fireworks Functions Usage fw.historyPalette.copySteps(array of indexes) Arguments array of indexes A zero-based array that specifies which steps from the History panel should be copied. If it is null, the currently selected steps are used.
  • Adobe 65011817 | Extended User Guide - Page 324
    Last updated 12/8/2009 EXTENDING FIREWORKS 320 Additional Fireworks Functions fw.historyPalette.getStepsAsJavaScript() Availability Fireworks 3. Usage fw.historyPalette.getStepsAsJavaScript(array of indexes) Arguments array of indexes A zero-based array that specifies which steps from the History
  • Adobe 65011817 | Extended User Guide - Page 325
    Last updated 12/8/2009 EXTENDING FIREWORKS 321 Additional Fireworks Functions fw.historyPalette.replaySteps() Availability Fireworks 3. Usage fw.historyPalette.replaySteps(array of indexes) Arguments array of indexes A zero-based array that specifies which steps from the History panel should be
  • Adobe 65011817 | Extended User Guide - Page 326
    Last updated 12/8/2009 EXTENDING FIREWORKS 322 Additional Fireworks Functions fw.historyPalette.setSelection() Availability Fireworks 3. Usage fw.historyPalette.setSelection(array of indexes) Arguments array of indexes Specifies which steps in the History panel are selected. Values are zero-based.
  • Adobe 65011817 | Extended User Guide - Page 327
    Last updated 12/8/2009 EXTENDING FIREWORKS 323 Additional Fireworks Functions document.findExportFormatOptionsByName() Availability Fireworks 3. Usage document.findExportFormatOptionsByName(name) Arguments name A string that specifies the name of the set of export settings to find. Returns If
  • Adobe 65011817 | Extended User Guide - Page 328
    Last updated 12/8/2009 324 Index A ActionScript 292 cross-product extensions 281 addBehavior() 30, 31 addElementMask() 34 addFrames() 35 addGuide() 35 addNewHotspot() 36 addNewImage() 37, 38 addNewImageViaCopy() 37 addNewImageViaCut() 38 addNewLayer() 38 addNewLine() 39 addNewOval() 39
  • Adobe 65011817 | Extended User Guide - Page 329
    Last updated 12/8/2009 EXTENDING FIREWORKS 325 Index D data types color string 7 mask 7 matrix 8 non-standard 7 point 8 rectangle 8 resolution 8 deleteAllInDocument() 66 deleteFrames() 66 deleteLayer() 67 deletePageAt() 67 deletePointOnPath() 68 deleteSavedSelection() 68 deleteSelection() 69
  • Adobe 65011817 | Extended User Guide - Page 330
    Last updated 12/8/2009 EXTENDING FIREWORKS 326 Index dom.getParentLayerNum() 86 dom.getPixelMask() 86 dom.getSelectionBounds() 87 dom.getShowGrid() 87 dom.getShowGuides() 88 dom.getShowRulers() 88 dom.getSnapToGrid() 89 dom.getSnapToGuides() 88 dom.getTextAlignment() 89 dom.group() 90 dom.
  • Adobe 65011817 | Extended User Guide - Page 331
    EDatabaseError 16 EDeletingLastMasterChild 16 EDiskFull 16 EDuplicateFileName 16 Effect object 241, 247 EffectList object 247 effectList property 10 effects, finding and replacing 21 EFileIsReadOnly 16 EFileNotFound 16 EGenericErrorOccurred 16 EGroupDepth 16 EIllegalThreadAccess 16 EInternalError 16
  • Adobe 65011817 | Extended User Guide - Page 332
    Object Model compared to API calls 7 using the 6 Flash debugging disable 199 enable 200 Flash document, exporting as 207 Flash extensions 281 Flash panels 292 Actionscript compatibility 294 event handlers 295 Flash wrapper extension 294 flattenDocument() 84 flattenSelection() 85 fonts, finding
  • Adobe 65011817 | Extended User Guide - Page 333
    () 89 getUndoState() 320 Global methods 13 Gradient object 260 GradientNode object 260 Group object 248 group() 90 growPIWindow() 316 Guides object 260 H hasCharacterMarkup() 90 hasMasterPage() 90 hidePIWindow() 315 hideSelection() 91 History panel functions 318 historyPalette.clearSteps() 318
  • Adobe 65011817 | Extended User Guide - Page 334
    Find 19 Frame 259 FrameNLayerIntersection 259 Gradient 260 GradientNode 260 Group 248 Guides 260 Hotspot 250 Image 249 ImageMap 276 ImagemapList 276 Instance 249 Layer 261 111 pathSimplify() 111 pathUnion() 111 Pattern object 262 Photoshop document, exporting as 206 placeTextInPath() 112 pngText 29
  • Adobe 65011817 | Extended User Guide - Page 335
    Last updated 12/8/2009 EXTENDING FIREWORKS 331 Index Q quit() 221 quitApplication() 222 R readNthTable() 222 readPanelStateFromFile() 222 rebuildColorTable() 113 rectangle 8 rectangle primitive 41 redefineStyleByName() 113 redo() 114 redraw() 114 redrawSmartShape() 115 reflectSelection() 115
  • Adobe 65011817 | Extended User Guide - Page 336
    Last updated 12/8/2009 setFloaterPosition() 230 setFloaterVisibility() 9, 230 setGradientName() 154 setGridColor() 155 setGridOrigin() 154 setGridSize() 155 setGroupType() 156 setGuideColor() 156 setHideAllFloaters() 231 setHotspotAltTag() 156 setHotspotColor() 157 setHotspotRectangle() 157
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336

Extending
ADOBE
®
FIREWORKS
®
CS
4