Summary of FIREWORKS 8-EXTENDING FIREWORKS

  • Page 1

    Extending fireworks.

  • Page 2

    Trademarks 1 step robopdf, activeedit, activetest, authorware, blue sky software, blue sky, breeze, breezo, captivate, central, coldfusion, contribute, database explorer, director, dreamweaver, fireworks, flash, flashcast, flashhelp, flash lite, flashpaper, flash video encoder, flex, flex builder, f...

  • Page 3

    3 contents chapter 1: extending fireworks overview . . . . . . . . . . . . . . . . . . . . 5 prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 installing an extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

  • Page 4

    4 contents.

  • Page 5

    5 1 chapter 1 extending fireworks overview to extend macromedia fireworks 8, you must write javascript code. You can use javascript to write your own objects and commands that affect fireworks documents and the elements within them. To accomplish these tasks, you must be proficient in javascript and...

  • Page 6

    6 extending fireworks overview installing an extension as you start learning the process of writing extensions, you might want to explore the extensions and resources already available through the macromedia exchange website (www.Macromedia.Com/exchange) . By installing an existing extension, you wi...

  • Page 7

    Conventions used in this guide 7 vector path compatibility with macromedia freehand although fireworks 8 imports winding fills from freehand mx, it does not provide a user interface that lets you create a winding fill. However, fireworks 8 has apis that let third-party developers create an interface...

  • Page 8

    8 extending fireworks overview additional resources for extension writers to communicate with other developers who are writing extensions, you can visit the fireworks online forums at www.Macromedia.Com/go/13012 ..

  • Page 9

    9 2 chapter 2 the fireworks object model if you want to extend the functionality of macromedia fireworks 8 by writing or modifying a javascript extensibility file, you must become familiar with the objects that fireworks makes available through javascript. The hierarchy of these objects comprises th...

  • Page 10

    10 the fireworks object model accessing a fireworks document all the functions listed in “document functions” on page 132 are methods of the document object, which represents a fireworks document. To perform a function on a document object, you must first get the document object model (dom) of the d...

  • Page 11

    Using the fireworks object model 11 for example, if the first open document is the current document, the first code fragment has the same effect as the second and third code fragments. The fw.Getdocumentdom() function references the current document (for more information, see “accessing a fireworks ...

  • Page 12

    12 the fireworks object model matrix data type the format for a matrix is {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-three transformation matrix; discussion of the construction of ...

  • Page 13

    Core objects 13 core objects this section describes the six core objects that are always available: dialogs, document, errors, files, find, and system. Dialogs object the following table lists the methods of the dialogs object, along with their data types and, where appropriate, acceptable values an...

  • Page 14

    14 the fireworks object model document object the following table lists the properties of the document object, along with their data types, acceptable values and notes. Read-only properties are marked with a bullet (•). You can also use many api calls to work with documents. For more information, se...

  • Page 15

    Core objects 15 filepathforrevert string the path to the file from which this document was opened, which is expressed as file://url, or null if created from scratch. Filepathforsave string the location to which this document was saved, which is expressed as file://url, or null if never saved. Fills ...

  • Page 16

    16 the fireworks object model height integer total height of the document, in pixels. To find the bottom edge of the document, use document. Top + document.Height. Isdirty boolean set to true if the document was modified since the last ti me it was saved. Ispaintmode • boolean set to true if the doc...

  • Page 17

    Core objects 17 maptype string acceptable values are "client" , "server" , and "both" . Corresponds to the image-map type selected in file > html properties > imagemap. Mattecolor string a color string that corresponds to the matte color specified in the optimize panel (for more information, see “co...

  • Page 18

    18 the fireworks object model the pngtext object fireworks maintains the following fields for use with the pngtext object: you can edit these or add your own fields, and they will be preserved across file saves. The pngtext object corresponds directly to the 'text' chunk of the document’s png struct...

  • Page 19

    Core objects 19 the following list contains the properties of the errors object alphabetically: eappalreadyrunning, eappnotserialized, earrayindexoutofbounds, ebadfilecontents, ebadjsversion, ebadnesting, ebadparam, ebadparamtype, ebadselection, ebuffertoosmall, echarconversionfailed, edatabaseerror...

  • Page 20

    20 the fireworks object model deletefile(docordir) string deletes the specified file or directory. Returns true if successful; false if the file or directory does not exist or cannot be deleted. Compare with deletefileifexisting() . Deletefileifexisting (docordir) string deletes the specified file o...

  • Page 21

    Core objects 21 getlasterrorstring() none if the last call to a method in a files object resulted in an error, returns a string that describes the error. If the last call succeeded, returns null . Gettempfilepath ({dirname}) string the argument, if used, must be expressed as file://url. Returns a fi...

  • Page 22

    22 the fireworks object model rename(docname, newplainfilename) string, string the docname argument is a file path or a file url to the file that you want to rename. The newplainfilename argument is the new name to assign to the file. The rename method returns a url path of the newly renamed file if...

  • Page 23

    Core objects 23 file reference object the file reference object is used to refer to a specific open file. The following table lists the methods of the file reference object, along with their data types and, where appropriate, acceptable values and notes. Find object there are several ways to specify...

  • Page 24

    24 the fireworks object model finding and replacing fonts and styles finding and replacing colors, fills, strokes, and effects replace string text to use as replacement text. Wholeword boolean if set to true , only whole words matching the search text are found. The default is false . Property data ...

  • Page 25

    Core objects 25 finding and replacing urls finding and replacing non-websafe colors with the closest websafe color fills boolean if set to true , fills that match the specified colors are replaced. Strokes boolean if set to true , strokes that match the specified colors are replaced. Effects boolean...

  • Page 26

    26 the fireworks object model system object the following table lists the properties of the system object, along with their data types and, where appropriate, acceptable values and notes. All system properties are read-only. The fireworks object the fireworks object is a global object, which you can...

  • Page 27

    The fireworks object 27 the following table lists the properties of the fireworks object, along with their data types and, where appropriate, acceptable values and notes. Read-only properties are marked with a bullet (•). Refer to the fireworks object by using fw.Propertyname or fireworks.Propertyna...

  • Page 28

    28 the fireworks object model appmaccreator • string in the format: "mkby" appmacjsffiletype • string in the format: "text" appname • string the name of the application ( "fireworks 8" ). This attribute is part of the common api, so it also appears as app.Appname (as implemented in macromedia dreamw...

  • Page 29

    The fireworks object 29 appxtrasdir • string the path to the xtras directory, which is expressed as file://url. Batchstatusstring string the string that currently appears in the batch progress dialog box. Set this property to change the string being displayed. Use with progresscountcurrent and progr...

  • Page 30

    30 the fireworks object model ellipsebcpconst • float a fixed value of 0.55229187012 used to calculate the distance between a point and its predecessor/successor for a perfect circle. For example, for a circle with a radius of 100 pixels, the predecessor/successor is 100*fw.Ellipsebcpconst pixels aw...

  • Page 31

    The fireworks object 31 progresscountcurrent integer the first number (x) that appears in the batch progress dialog box, in the “file x of y” field. Set this property to change the number. Progresscounttotal integer the second number (y) that appears in the batch progress dialog box, in the “file x ...

  • Page 32

    32 the fireworks object model objects within fireworks documents this section describes the objects that can get or set the properties of elements in a fireworks document. For syntax on accessing fireworks documents and elements within them, see “accessing a fireworks document” on page 10 and “passi...

  • Page 33

    Objects within fireworks documents 33 behavior object the following table lists the properties of the behavior object, along with their data types and, where appropriate, acceptable values and notes. Brush object the following table lists the properties of the brush object, along with their data typ...

  • Page 34

    34 the fireworks object model feedback string acceptable values are "none" , "brush" , and "background" . Flowrate float 0 to 100 maxcount integer 0 to 64 minsize float 0 to 100 name string the name of the brush, which is visible in the stroke panel. Numdashes integer 0 to 3 sense_hdir_angle float t...

  • Page 35

    Objects within fireworks documents 35 sense_random_opacity float sense_random_saturation float sense_random_scatter float sense_random_size float sense_speed_angle float sense_speed_blackness float sense_speed_hue float sense_speed_lightness float sense_speed_opacity float sense_speed_saturation flo...

  • Page 36

    36 the fireworks object model contour object the following table lists the properties of the contour object, along with their data types and, where appropriate, acceptable values and notes. Textureblend float 0 to 100 textureedge float 0 to 100 tipcoloringmode string acceptable values are "random" ,...

  • Page 37

    Objects within fireworks documents 37 contournode object the following table lists the properties of the contournode object, along with their data types and, where appropriate, acceptable values and notes. Property data type notes dynamicinfo array array of contournodedynamicinfo objects on this con...

  • Page 38

    38 the fireworks object model the following table lists the methods of the contournode object, along with their parameters. Method parameter definition registermove() object the registermoveparms object containing the move parameters. Use smartshape.Getdefaultmoveparms() to obtain this object, then ...

  • Page 39

    Objects within fireworks documents 39 contournodedynamicinfo object the following table lists the properties of the contournodedynamicinfo object, along with their data types and, where appropriate, acceptable values and notes. Controlpoint object the following table lists the properties of the cont...

  • Page 40

    40 the fireworks object model the following table lists the methods of the controlpoint object, along with their parameters. Method parameter definition registermove() object the registermoveparms object containing the move parameters. Use smartshape.Getdefaultmoveparms() to obtain this object, then...

  • Page 41

    Objects within fireworks documents 41 effect object each fireworks effect (bevel, drop shadow, etc.) has a unique set of attributes. So, each effect object has its own set of properties that can be set (instead of a common set of properties for all effect objects). The properties for various effect ...

  • Page 42

    42 the fireworks object model effectmoaid string "{7fe61102-6ce2-11d1-8c76000502701850}" embossfacecolor string a color string that specifies the color that is blended onto the face of the object when embossing (for more information, see “color string data type” on page 11 ). Glowstartdistance integ...

  • Page 43

    Objects within fireworks documents 43 blur object blur more object brightness/contrast object slopemultiplier float a multiplier that is used to calculate the magnitude of the bevel slope. Default effects all use 1, but other values should work. For example, 0.5 gives a more subtle slope and 2.0 giv...

  • Page 44

    44 the fireworks object model convert to alpha object curves object drop shadow object property data type notes effectisvisible boolean if set to false , the effect is included but temporarily hidden. The default value is true . Effectmoaid string "{2932d5a2-ca48-11d1-8561000502701850}" property dat...

  • Page 45

    Objects within fireworks documents 45 find edges object gaussian blur object hue/saturation object property data type notes effectisvisible boolean if set to false , the effect is included but temporarily hidden. The default value is true . Effectmoaid string "{fc7093f1-f95c-11d0-8be200a024cdc039}" ...

  • Page 46

    46 the fireworks object model inner shadow object invert object levels object property data type notes effectisvisible boolean if set to false , the effect is included but temporarily hidden. The default value is true . Effectmoaid string "{5600f702-774c-11d3-baad0000861f4d01}" shadowangle integer t...

  • Page 47

    Objects within fireworks documents 47 sharpen object source_low_rgb* integer these source* values are all input levels to the filter, with values of 0 to 255. Source_high_rgb* source_low_red* source_high_red* source_low_green* source_high_green* source_low_blue* source_high_blue* dest_low_rgb intege...

  • Page 48

    48 the fireworks object model sharpen more object unsharp mask object effectlist object the following table lists the properties of the effectlist object, along with their data types and, where appropriate, acceptable values and notes. Property data type notes effectmoaid string "{1f2f2591-9db7-11d1...

  • Page 49

    Objects within fireworks documents 49 element object element is an abstract or base class; nothing of class element ever exists. However, it is useful for simplifying the other class descriptions. Read-only properties are marked with a bullet (•). Property data type notes blendmode string acceptable...

  • Page 50

    50 the fireworks object model the following table lists the methods of the element object, along with their parameters. Group object group is a subclass of the base class element and contains the following properties in addition to those in element (for more information, see “element object” on page...

  • Page 51

    Objects within fireworks documents 51 the following table lists the methods of the group object, along with their parameters. Smartshapecode string the body of code in the javascript file that defines the auto shape object. Transformmode string can be one of the following: "alwaystransform" if the a...

  • Page 52

    52 the fireworks object model image object image is a subclass of the base class element (for more information, see “element object” on page 49 ). It contains no properties or methods other than those in element. Instance object instance is a subclass of the base class element and contains the follo...

  • Page 53

    Objects within fireworks documents 53 hotspot object a hotspot converts to an image map during html export. Hotspot is a subclass of the base class element and contains the following properties in addition to those in element (for more information, see “element object” on page 49 ). Slicehotspot obj...

  • Page 54

    54 the fireworks object model path object path is a subclass of the base class element and contains the following properties in addition to those in element (for more information, see “element object” on page 49 ). Htmltext string if slicekind is set to "empty" , this text is exported instead of the...

  • Page 55

    Objects within fireworks documents 55 text object text is a subclass of the base class element and contains the following properties in addition to those in element (for more information, see “element object” on page 49 ). Property data type notes antialiased boolean if set to true (the default), an...

  • Page 56

    56 the fireworks object model texture object the texture object has the following read-only property. Elementmask object the following table lists the properties of the elementmask object, along with their data types and, where appropriate, acceptable values and notes. Rawwidth float width of the ar...

  • Page 57

    Objects within fireworks documents 57 exportframeinfo object the following table lists the properties of the exportframeinfo object, along with their data type and, where appropriate, acceptable values and notes. Mode string acceptable values are "mask to image" and "mask to path" . Owner object the...

  • Page 58

    58 the fireworks object model exportoptions object use the following information to understand the rules for determining scaling in this object: ■ if usescale is set to true (the default), percentscale is used to uniformly scale the object on export, and applyscale is ignored. ■ if usescale is set t...

  • Page 59

    Objects within fireworks documents 59 colormode string acceptable values are "indexed" (the default) , "24 bit" , and "32 bit" . Crop boolean the default value is false. Cropbottom integer the default value is 0 . Cropleft integer the default value is 0 . Cropright integer the default value is 0 . C...

  • Page 60

    60 the fireworks object model paletteinfo array array of exportpaletteinfo objects, or null if all entries in the array are default values (for more information, see “exportpaletteinfo object” on page 61 ); default value is null. Palettemode string acceptable values are "adaptive" (the default), "cu...

  • Page 61

    Objects within fireworks documents 61 exportpaletteinfo object the following table lists the properties of the exportpaletteinfo object, along with their data types and, where appropriate, acceptable values and notes. Exportsettings object the following table lists the properties of the exportsettin...

  • Page 62

    62 the fireworks object model exportfilestyle string acceptable values are: “html and images” “images only” “dreamweaver lbi” "director html" "css layers" "layers to files" "frames to files" "lotus domino" "macromedia flash swf" "illustrator" "photoshop" fileextension string defines the extension to...

  • Page 63

    Objects within fireworks documents 63 sliceautonaming1 through sliceautonaming6 string used to generate a name by concatenating six strings. If you need fewer than six strings, fill in the remaining strings with "none" . Acceptable values are: "none" — generates nothing. "row_col" — generates a uniq...

  • Page 64

    64 the fireworks object model fill object the following table lists the properties of the fill object, along with their data types and, where appropriate, acceptable values and notes. Sliceframenaming1 and sliceframenaming2 string used to generate a name by concatenating two strings; the resulting s...

  • Page 65

    Objects within fireworks documents 65 frame object the following table lists the properties of the frame object, along with their data types and, where appropriate, acceptable values and notes. Read-only properties are marked with a bullet (•). Edgetype string acceptable values are "hard" and "antia...

  • Page 66

    66 the fireworks object model framenlayerintersection object the following table lists the properties of the framenlayerintersection object, along with their data types and, where appropriate, acceptable values and notes. Read-only properties are marked with a bullet (•). Gradient object the followi...

  • Page 67

    Objects within fireworks documents 67 gradientnode object the following table lists the properties of the gradientnode object, along with their data types and, where appropriate, acceptable values and notes. Guides object the following table lists the properties of the guides object, along with thei...

  • Page 68

    68 the fireworks object model 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 (•). Pathattrs object the following table lists the properties of th...

  • Page 69

    Objects within fireworks documents 69 pattern object the following table lists the property of the pattern object, along with its data type and notes. Rectangleprimitive object the following table lists the properties of the rectangleprimitive object, along with their data types and, where appropria...

  • Page 70

    70 the fireworks object model registermoveparms object the following table lists the properties of the registermoveparms object, along with their data types and, where appropriate, acceptable values and notes. Transform matrix a matrix that indicates all the transformations that were applied to the ...

  • Page 71

    Objects within fireworks documents 71 constrainy the value to constrain the y coordinate. Note: the method constrainykey must be used with this method. Constrainykey pass in the key that you want to use to constrain the y-coordinate value. A value of "none" means that y will not be constrained. A va...

  • Page 72

    72 the fireworks object model deltartor float determines the mouse radius change relative to the point radius change. For example, a value of 1.0 means that as the mouse moves 1 pixel away from the center of the object, the point also moves 1 pixel away from the center of the object. Deltashortestsi...

  • Page 73

    Objects within fireworks documents 73 deltaytoy float the ratio of mouse movement to the movement of the referenced point’s y coordinate. For example, 1.0 means that when the mouse moves 1 pixel toward the bottom of the document, the referenced point also moves 1 pixel toward the bottom of the docum...

  • Page 74

    74 the fireworks object model singletextrun object the following table lists the properties of the singletextrun object, along with their data types and, where appropriate, acceptable values and notes. Minmaxrelative boolean determines whether the min and max values are relative or absolute. For exa...

  • Page 75

    Objects within fireworks documents 75 smartshape object the following table lists the properties of the smartshape object, along with their data types and, where appropriate, acceptable values and notes. Read-only properties are marked with a bullet ( •) . Property data type notes altoptkeydown • bo...

  • Page 76

    76 the fireworks object model the following table lists the method of the smartshape object, along with its parameter. Style object the following table lists the properties of the style object, along with their data types and, where appropriate, acceptable values and notes. All style object properti...

  • Page 77

    Objects within fireworks documents 77 tdtagtext string a string that contains all the attributes of a table cell except colspan and rowspan . Should be in a format similar to the following: "bgcolor="ff0000" valign="top"“ textbold boolean whether to make the specified text bold; used only if use_tex...

  • Page 78

    78 the fireworks object model textattrs object the following table lists the properties of the textattrs object, along with their data types and, where appropriate, acceptable values and notes. Use_textfont boolean if set to true , applies the textfont property of the pathattrs object when applying ...

  • Page 79

    Objects within fireworks documents 79 kerning float also known as pair kerning, kerning specifies the percentage of an em square by which to separate two characters, in addition to the amount the font specifies. Applies to only one pair or characters. To specify kerning for a range of text, use the ...

  • Page 80

    80 the fireworks object model textruns object the following table lists the properties of the textruns object, along with their data types and, where appropriate, acceptable values and notes. Html export objects fireworks provides several object types that support the output of html and sliced image...

  • Page 81

    Html export objects 81 behaviorinfo object the behaviorinfo object describes a behavior that is assigned to an element. There are seven behaviors: status message, swap image, button down, swap image restore, button highlight, button restore, and popup menu (new in fireworks 4). The following table l...

  • Page 82

    82 the fireworks object model downhighlight boolean if action is set to 6 (button highlight), specifies if there is an image highlight for the down button state. Event integer specifies the type of event: 0 is mouse over , 1 is on click , 2 is mouse out , and 3 is on load . In the standard (default)...

  • Page 83

    Html export objects 83 hilitecolor string if action is set to 9 (popup menu), specifies the highlight color at the upper-left of the menu cells. Menufontfamily string if action is set to 9 (popup menu), specifies the name of the font family to use for the menu. Menuheight integer if action is set to...

  • Page 84

    84 the fireworks object model targetframenum zero-based index if action is set to 2 (swap image), specifies the frame number to be swapped if hastargetframe is set to true . Targetrownum zero-based index if action is set to 2 (swap image), specifies the row in the slices table that is swapped. Targe...

  • Page 85

    Html export objects 85 behaviorslist object the behaviorslist object is an array of behaviorinfo objects that describe the behaviors in an image map (see “behaviorinfo object” on page 80 ). The behaviorslist object does not occur by itself. That is, all occurrences of behaviorslist objects are membe...

  • Page 86

    86 the fireworks object model docid integer a number that is assigned to a document to help identify html generated from it. The docid does not change when you change the name of a file. However, if you use file > save as, you can get multiple files with the same docid . Docsavefolder string c ontai...

  • Page 87

    Html export objects 87 hasbackgroundlink boolean set to true if the fireworks document has a background url. Height integer height of the image that is being exported, in pixels. In the slices.Htt file, it is the total height of the output images. Htmlencoding string determines the encoding standard...

  • Page 88

    88 the fireworks object model 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. Style string the html style that is used to export...

  • Page 89

    Html export objects 89 imagemaplist object the imagemaplist object is an array of imagemap objects that describe the areas in an image map (see “imagemap object” on page 88 ). To access imagemap objects, use the imagemaplist array, as shown below: var curimagemap = imagemaplist[i]; the imagemaplist ...

  • Page 90

    90 the fireworks object model 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. Property (read-only) or method data type notes ...

  • Page 91

    Html export objects 91 htmltext string text for a text-only slice. Imagemap object imagemaplist object containing the image map information for this slice (see “imagemaplist object” on page 89 ). Imagesuffix string extension for the image in this cell, including a period (.); for example, ".Gif" . I...

  • Page 92

    92 the fireworks object model 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 89 ). For example, slices[0][0] is the slice information for the first cell at row 0, column 0. The first array is rows; t...

  • Page 93

    Working with selected objects 93 working with selected objects when an object is selected, either programmatically (for example, using the dom.Selectall() function) or by a user, you can return (get) or set the value of that object’s properties using common notation that will work on various objects...

  • Page 94

    94 the fireworks object model you can use the information in the following sections to return or set property values. Working with properties for any selected object you can get values for the following read-only properties of any type of selected object: ■ top ■ left ■ width ■ height ■ visible ■ op...

  • Page 95

    Working with selected objects 95 working with specific properties for selected elements some elements have specific properties that can be returned in addition to those that can be returned for any selected object (for more information, see “working with properties for any selected object” on page 9...

  • Page 96

    96 the fireworks object model path ■ pathattributes ■ randseed ■ textureoffset ■ contours to return the value of the fill color for the currently selected path, type the following code: fillcolor = fw.Selection[0].Pathattributes.Fillcolor group ■ elements ■ grouptype to return the number of objects ...

  • Page 97

    Working with selected objects 97 text ■ antialiased ■ antialiasmode ■ autokern ■ orientation ■ pathattributes ■ randseed ■ textruns ■ textureoffset ■ transformmode to return the antialiasmode setting for the currently selected text block, type the following code: antialiasedsetting = fw.Selection[0]...

  • Page 98

    98 the fireworks object model pathattributes several objects have the pathattributes property. The following list is the valid set of pathattributes subproperties that can be returned or set: ■ brushcolor ■ fillcolor ■ brush ■ fill ■ brushtexture ■ filltexture ■ fillhandle1 ■ fillhandle2 ■ fillhandl...

  • Page 99

    99 3 chapter 3 cross-product extensions cross-product extensions include any fireworks-related extensions developed for, or in, another macromedia application. These cross-product extensions include those written for other tools, such as macromedia dreamweaver 8 that use existing fireworks 8 functio...

  • Page 100

    100 cross-product extensions xml and remote procedure calls applications written with flash actionscript 2.0 or c++ applications can control fireworks 8 by sending javascript instructions, called remote procedure calls (rpc), encoded in xml through a local socket. The fireworks rpc gives other appli...

  • Page 101

    Cross-product architecture 101 fireworks rpc transactions pass xml between an rpc client and the fireworks rpc server built in to fireworks 8. 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 lis...

  • Page 102

    102 cross-product extensions rpc client xml requests the xml request contains the following four pieces of information for fireworks: ■ the type of operation to perform ■ the name of the operation to perform ■ the object on which the operation is performed ■ any parameters the operation needs logica...

  • Page 103

    Cross-product architecture 103 ■ the release operation informs the server that the client has finished working on the specified object. A release request must specify only an obj attribute and no subelements. In the following example, the client tells the server that it is has finished working on th...

  • Page 104

    104 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 parameters and parts of replies. There are sev...

  • Page 105

    Cross-product architecture 105 parameters parameters are simply data nodes with an order attribute. The order attribute identifies the order in which the parameters should be processed for the server. In this way, the rpc client can use any xml client library to build parameters in any order, and th...

  • Page 106

    106 cross-product extensions rpc server xml replies after the rpc server processes an xml request, it packages the result as an xml fragment and sends it back to the client. If an error occurred during processing, the server returns an error code in the result xml. Otherwise, the reply node contains...

  • Page 107

    Cross-product architecture 107 rpc and the fireworks javascript dom the rpc server does not allow for self-discovery of the server classes and their methods. Instead the client must know the methods and properties of a given class of objects beforehand. If the client is written in actionscript or c+...

  • Page 108

    108 cross-product extensions the following table shows the mapping between the fireworks object model data types and the rpc data types. Dom data type rpc data type example description array array types map identically. Boolean boolean both types are identical. Both contain only two values: true or ...

  • Page 109

    Cross-product architecture 109 object server object, or dictionary for an object type, the client can simply specify a server object. However, for certain objects (such as objects of the effect class) a dictionary can be constructed and then used. If the client creates a dictionary, all properties o...

  • Page 110

    110 cross-product extensions security the rpc server restricts some operations to make sure that a client cannot use the rpc server maliciously to damage the user’s system. The first security mechanism is that the rpc server binds to the loopback address, 127.0.0.1. This means all clients must run o...

  • Page 111

    Cross-product architecture 111 rpcmethods.Createautoreleasepool() usage rpcmethods.Createautoreleasepool() arguments none. Returns nothing. Description starts the auto-release block. Rpcmethods.Destroyautoreleasepool() usage rpcmethods.Destroyautoreleasepool() arguments none. Returns nothing. Descri...

  • Page 112

    112 cross-product extensions description adds an object to the current auto-release pool. This function is called by the auto-release block. If no object pool exists, this function does nothing. Rpcmethods.Removefromautoreleasepool() usage rpcmethods.Removefromautoreleasepool(proxyobject) arguments ...

  • Page 113

    Cross-product architecture 113 here is an example: rpcmethods.Createautoreleasepool(); var selobject = fw.Selection.Get(0); rpcmethods.Destroyautoreleasepool(); calling the createautoreleasepool() function marks the beginning of the auto-release block, and calling the destroyautoreleasepool() functi...

  • Page 114

    114 cross-product extensions 3. In the first frame, add the following in the actions panel to link the general fireworks stub file to the movie when it is published: #include "fwstubs.As" 4. Create a simple button which will activate the rpc script. 5. Insert the button in the first frame, in the mi...

  • Page 115

    Flash panels 115 the swf creates a new fireworks document, and draws a 200 x 200 pixel green rectangle in fireworks: flash panels fireworks contains macromedia flash player, which plays shockwave files as panels and commands in the fireworks interface. You can also add a macromedia api wrapper exten...

  • Page 116

    116 cross-product extensions how flash panels and commands work macromedia flash developers can create interactive movies that contain a combination of actionscript and calls to the fireworks api for two types of deployment: interactive panels or modal commands. Basically, while writing actionscript...

  • Page 117

    Flash panels 117 description declares a set of javascript code to pass to the fireworks api, allowing flash authors to embed fireworks api commands in a frame of a flash movie. The commands should be embedded in the same way that you would write separate javascript code blocks to perform similar ope...

  • Page 118

    118 cross-product extensions using the api wrapper extension in macromedia flash you can install a special extension that was developed specifically for writing fireworks functions in actionscript (currently, only actionscript 1.0) either as a replacement for the mmexecute() and mmendcommand() funct...

  • Page 119

    Flash panels 119 guidelines for creating panels and commands ■ you need to surround nested quotation marks need with backslash (\). The following example prints: john’s example is really “complex”! Mmexecute('alert("john\'s example is really \"complex\"!")'; ■ the movie size set in flash is used in ...

  • Page 120

    120 cross-product extensions creating event handlers to create an event handler, implement a function with the corresponding event name. Currently, fireworks supports the following events for flash panels: event description onfwstartmovie sent to the swf file right after fireworks has started (or re...

  • Page 121

    Flash panels 121 example function onfwdocumentnamechange() { // your code goes here } example _global.Onfwdocumentnamechange = function () { // your code goes here } both examples show how to implement a handler for the document name changed event. However, the second example will only work if the a...

  • Page 122

    122 cross-product extensions publishing when testing your script, use the file > publish menu option in macromedia flash mx. The shockwave file is in the same place as the fla file after publishing. Debugging fireworks provides two functions to help debug flash panel actionscript (for more informati...

  • Page 123

    123 4 chapter 4 auto shapes auto shapes are vector objects that contain information about how the user can interact with them on the screen. Auto shapes appear in the macromedia fireworks 8 user interface as “auto shapes” but are programmatically called smartshape objects in the javascript code that...

  • Page 124

    124 auto shapes you can create auto shape icons for the tools panel or auto shapes panel in png, jpg, or gif format. For the tools panel, the icon image should be 16 x 16 pixels (if the image is larger than 16 x 16 pixels, fireworks scales the image to fit in the tools panel). For the auto shapes pa...

  • Page 125

    Creating an auto shape 125 smartshape.Elem.Elements[0].Contours[0].Nodes[2].Y = 125; smartshape.Elem.Elements[0].Contours[0].Nodes[2].Succx = 200; smartshape.Elem.Elements[0].Contours[0].Nodes[2].Succy = 125; smartshape.Elem.Elements[0].Contours[0].Nodes[3] = new contournode; smartshape.Elem.Element...

  • Page 126

    126 auto shapes adding control points after selecting an auto shape in a document, the user can click its control points to adjust the object. You must define the control points for your auto shape before you can define what happens to the object when the user manipulates them. The following code ad...

  • Page 127

    Creating an auto shape 127 ■ "begindragcontrolpoint" fireworks sends this message when the user clicks and holds the mouse button on a control point. ■ "dragcontrolpoint" fireworks sends this message every time the mouse moves during a drag operation (as long as smartshape.Getsdragevents is set to t...

  • Page 128

    128 auto shapes draginsert() this function is called every time the mouse moves during a drag operation (as long as smartshape.Getsdragevents is set to true ). See “smartshape object” on page 75 . Enddraginsert() this function is called on a mouse-up event after a drag operation. Begindragcontrolpoi...

  • Page 129

    Creating an auto shape 129 these functions correspond directly with the messages listed in “fireworks messages” on page 126 . To invoke your own function names in response to fireworks messages, you need to write a switch() statement. Switch statements if you take a look at some existing auto shapes...

  • Page 130

    130 auto shapes 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 funct...

  • Page 131

    131 5 chapter 5 fireworks javascript api this chapter lists javascript functions supported by macromedia fireworks 8 that let you create useful fireworks extensions and customized fireworks menus. Almost any task that the user can accomplish in fireworks with the menus, tools, or floating panels can...

  • Page 132

    132 fireworks javascript api working with selected elements many api functions in this chapter refer to a “selection” or to “selected items.” these terms refer to fireworks elements, such as text boxes or images, that are currently selected. In most cases, the functions work even if only one item is...

  • Page 133

    Document functions 133 arguments action a string that specifies the behavior to be added, such as "mm_swapimagerestore()" . For a list of all the behaviors that can be added, see “using the dom.Addbehavior() function” on page 133 . Event the event that triggers the behavior. Acceptable values are "o...

  • Page 134

    134 fireworks javascript api arguments type, barname, target, swapframe, filename, preload ■ pass "down" for type . ■ pass "navbar1" for the name of the navigation bar. ■ target specifies the slice to which the behavior is attached. Pass –1 for this value; all other values are used internally by fir...

  • Page 135

    Document functions 135 ■ preload is a binary value that specifies whether to preload the swapped image (pass 1) or not (pass 0 ). ■ downhighlight is a binary value that specifies whether an image should be used for highlighting on mouse down (pass 1 ) or not (pass 0 ). If you pass 1 , use the next t...

  • Page 136

    136 fireworks javascript api 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 availability fireworks 3. Arguments non...

  • Page 137

    Document functions 137 example fw.Getdocumentdom().Addbehavior("mm_statusmessage(\"status message!\")", "onmouseover", -1); mm_swapimage availability fireworks 3. Arguments target, swapframe, filename, preload, restoreonmouseout ■ target specifies the slice to which the behavior is attached. Pass –1...

  • Page 138

    138 fireworks javascript api example fw.Getdocumentdom().Addbehavior("mm_swapimgrestore()", "onmouseout", -1); description adds a swap image restore behavior. Dom.Addelementmask() availability fireworks 4. Usage dom.Addelementmask(mode, {bentermaskeditmode}) arguments mode acceptable values for mode...

  • Page 139

    Document functions 139 arguments howmany an integer that specifies how many frames to add. Where the location where frames should be added. Acceptable values for where are "beginning" , "before current" , "after current" , and "end" . Badvanceactiveframe added in fireworks 4, specifies whether to ch...

  • Page 140

    140 fireworks javascript api 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 guide at the x coordinate of 217: fw.Getdocumentdom().Addguide(217, "vertical"); dom.Addnewhotspot() ...

  • Page 141

    Document functions 141 arguments boundingrectangle a rectangle that specifies the bounds of the image to be added (see “rectangle data type” on page 12 ). You cannot create an image that is larger than the document; therefore, if you pass in a rectangle with bounds larger than the document size, you...

  • Page 142

    142 fireworks javascript api dom.Addnewimageviacut() availability fireworks mx. Usage dom.Addnewimageviacut() arguments none. Returns nothing. Description adds a new image to the document that contains the contents of the current paint mode selection. The new image is placed directly above the activ...

  • Page 143

    Document functions 143 example the following command adds a new unshared layer with a default name that is generated by fireworks: fw.Getdocumentdom().Addnewlayer(null, false); dom.Addnewline() availability fireworks 3. Usage dom.Addnewline(startpoint, endpoint) arguments startpoint and endpoint poi...

  • Page 144

    144 fireworks javascript api returns nothing. Description adds a new oval fitting into the specified bounding rectangle. The oval uses the document’s current default path attributes and is added on the current frame and layer. Example the following command adds a new oval within the specified coordi...

  • Page 145

    Document functions 145 see also dom.Addnewrectangleprimitive() dom.Addnewrectangleprimitive() availability fireworks 4. Usage dom.Addnewrectangleprimitive(boundingrectangle, roundness) arguments boundingrectangle a rectangle that specifies the bounds within which the new rectangle primitive is added...

  • Page 146

    146 fireworks javascript api dom.Addnewsinglepointpath() availability fireworks 3. Usage dom.Addnewsinglepointpath(controlpointfirst, controlpointlast, bcopyattrs) arguments controlpointfirst , mjainpoint , and controlpointlast points that specify the x,y coordinates of the preceding control point, ...

  • Page 147

    Document functions 147 arguments numsides an integer that specifies the number of sides of the new path. Spikiness a floating-point 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...

  • Page 148

    148 fireworks javascript api 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 and places an instance of it in the docum...

  • Page 149

    Document functions 149 dom.Addswapimagebehaviorfrompoint() availability fireworks 3. Usage dom.Addswapimagebehaviorfrompoint(where) arguments where a point that specifies the x,y coordinates of the hotspot or slice that contains the swap image behavior to be added (see “point data type” on page 12 )...

  • Page 150

    150 fireworks javascript api boktoincreasesize specifies whether the export file size can be increased. ■ if boktoincreasesize is true , and the current size is less than sizeinbytes , the argument increases the quality of the export settings as much as possible, making the export size larger if nec...

  • Page 151

    Document functions 151 arguments alignmode acceptable values are "left" , "right" , "top" , "bottom" , "center vertical" , and "center horizontal" . Aligntocanvas boolean. Determines if the alignment is to the canvas or items. The default value is false . Returns nothing. Description aligns the sele...

  • Page 152

    152 fireworks javascript api dom.Appendpointtopath() availability fireworks 3. Usage dom.Appendpointtopath(ontourindex, pttoinsertbefore, controlpointfirst, mainpoint, controlpointlast) arguments contourindex an zero-based index value that specifies the contour to which the bézier point is appended....

  • Page 153

    Document functions 153 arguments pt a point that specifies the x,y coordinates of the point to be added (see “point data type” on page 12 ). Tolerance a floating-point value > = 0 that specifies the tolerance between the new point and the starting point of the polyline path. If the new point is with...

  • Page 154

    154 fireworks javascript api arguments bnonullfills if bnonullfills is true and the current fill is none, then a default fill is applied instead of no fill. Returns nothing. Description applies the document’s current fill to the selection. Example the following command applies the current fill to th...

  • Page 155

    Document functions 155 dom.Applyfontmarkup() availability fireworks 3. Usage dom.Applyfontmarkup(fontattribute, value) arguments fontattribute acceptable values for fontattribute are "size" and "face" . Value if fontattribute is "size" , value must be of the form "xxxpt" to specify a point size; a s...

  • Page 156

    156 fireworks javascript api example the following command applies the first style that fireworks encounters named “style 7”, which, in this case, is a default style: fw.Getdocumentdom().Applystyle("style 7", 0); dom.Arrange() availability fireworks 3. Usage dom.Arrange(arrangemode) arguments arrang...

  • Page 157

    Document functions 157 description attaches the selected text to the selected path. If no text and path are selected, no action occurs. Example when two items are selected (one a text block and the other a shape), the following command attaches the text block to the shape’s path: fw.Getdocumentdom()...

  • Page 158

    158 fireworks javascript api dom.Changesliceguide() availability fireworks mx. Usage dom.Changesliceguide(currentposition, newposition, guidekind, ismagneticdrag, issingledrag) arguments currentposition a floating-point value that specifies the current position of the slice guide to be moved. Newpos...

  • Page 159

    Document functions 159 dom.Clearjpegmask() availability fireworks 4. Usage dom.Clearjpegmask() arguments none. Returns nothing. Description clears the “selective jpeg mask” for the document. Dom.Clipcopy() availability fireworks 3. Usage dom.Clipcopy() arguments none. Returns nothing. Description co...

  • Page 160

    160 fireworks javascript api 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 ...

  • Page 161

    Document functions 161 dom.Clipcut() availability fireworks 3. Usage dom.Clipcut() arguments none. 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() ...

  • Page 162

    162 fireworks javascript api whatifpastingintoelementmask an optional argument, added in fireworks 4, that applies only if the user is editing an element mask, and that element mask is an empty image mask. In this case, the pasted elements replace the existing mask (because it is essentially a mask ...

  • Page 163

    Document functions 163 maskreplaceoptions acceptable values for maskreplaceoptions are " replace " (if an element mask already exists, replace it with the pasted one), " add " (if an element mask already exists, add the pasted mask to it), and " ask " (displays a dialog box to let the user decide). ...

  • Page 164

    164 fireworks javascript api 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 the fromchannel is pasted in to all th...

  • Page 165

    Document functions 165 arguments whatifresolutiondifferent an optional string that specifies how resampling should be done if the resolution of the clipboard contents doesn’t match the resolution of the document. Acceptable values for whatifresolutiondifferent are "resample" , "do not resample" , an...

  • Page 166

    166 fireworks javascript api example the following command copies the selected items on top of the original items: fw.Getdocumentdom().Cloneselection(); see also dom.Duplicateselection() dom.Close() availability fireworks 3. Usage dom.Close(bprompttosavechanges) arguments bprompttosavechanges if bpr...

  • Page 167

    Document functions 167 description if a single animation symbol is selected, this function converts it from an animation symbol to a graphics symbol. See also dom.Converttoanimsymbol() , dom.Converttosymbol() dom.Convertmarqueetopath() availability fireworks 7. Usage dom.Convertmarqueetopath() argum...

  • Page 168

    168 fireworks javascript api description converts path to marquee selection. Dom.Converttoanimsymbol() availability fireworks 4. Usage dom.Convettoanimsymbol(name, numframes, offsetdistpt, rotationamount, scaleamount, startopacity, endopacity) arguments name a string that specifies a name for the ne...

  • Page 169

    Document functions 169 dom.Converttopaths() availability fireworks 3. Usage dom.Converttopaths() arguments none. Returns nothing. Description converts the selected text items into editable paths. Example the following command converts the selected text items into editable paths: fw.Getdocumentdom()....

  • Page 170

    170 fireworks javascript api example the following command creates a graphic symbol from the selected item and names it “star”: fw.Getdocumentdom().Converttosymbol("graphic", "star"); see also dom.Converttoanimsymbol() , dom.Convertanimsymboltographicsymbol() dom.Convolveselection() availability fir...

  • Page 171

    Document functions 171 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.Getdocumentdom().Copyhtmlwizard(); dom.Copytoh...

  • Page 172

    172 fireworks javascript api returns nothing. Description creates one or more hotspots from the selection. 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", "...

  • Page 173

    Document functions 173 returns nothing. Description deletes all the objects in the document. Dom.Deleteframes() availability fireworks 3. Usage dom.Deleteframes(frameindex, howmany) arguments frameindex an integer value that specifies the location at which to begin deleting frames, starting with 0 (...

  • Page 174

    174 fireworks javascript api description deletes a layer. Example the following command deletes the current layer: fw.Getdocumentdom().Deletelayer(-1); dom.Deletepointonpath() availability fireworks 4. Usage dom.Deletepointonpath(contourindex, pointindex) arguments contourindex an integer value that...

  • Page 175

    Document functions 175 arguments bfilldeletedarea this argument is ignored if fireworks is not in bitmap mode. If fireworks is in bitmap mode and bfilldeletedarea is true , the deleted pixels are filled with the current fill color. If false , the deleted pixels are filled to transparent. Returns not...

  • Page 176

    176 fireworks javascript api dom.Deletesymbol() availability fireworks 3. Usage dom.Deletesymbol(symbolname) 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 f...

  • Page 177

    Document functions 177 returns nothing. Dom.Detachtextfrompath() availability fireworks 3. Usage dom.Detachtextfrompath() arguments none. Returns nothing. Description splits the selected text-on-a-path items into its original text and path items. Dom.Distribute() availability fireworks 3, updated wi...

  • Page 178

    178 fireworks javascript api dom.Distributelayertoframes() availability fireworks 3. Usage dom.Distributelayertoframes(layerindex) arguments layerindex an integer value that specifies the layer that contains the items to be distributed, starting with 0 (although, to specify the current layer, pass –...

  • Page 179

    Document functions 179 dom.Dragcontrolpoint() availability fireworks mx 2004. 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 ...

  • Page 180

    180 fireworks javascript api where acceptable values are "beginning" , "before current" , "after current" , and "end" . Bdupeselectiononly if bdupeselectiononly is true , only items in the specified frame that are selected are duplicated to the new frame. Returns nothing. Description duplicates a fr...

  • Page 181

    Document functions 181 description duplicates a layer. Example the following command places three copies of the current layer at the end of the document: fw.Getdocumentdom().Duplicatelayer(-1, 3, "end"); dom.Duplicateselection() availability fireworks 3. Usage dom.Duplicateselection() arguments none...

  • Page 182

    182 fireworks javascript api arguments frameindexfirst and frameindexlast integer values that specify the range of frames (inclusive) to which the items should be copied, starting with 0 (although, to specify the current frame, pass –1 here). ■ if both arguments are the same, duplicates are placed o...

  • Page 183

    Document functions 183 arguments symbol the symbol to duplicate. ■ to duplicate all selected symbols in the library (not the document), pass a null value. ■ duplicating a linked symbol results in a nonlinked duplicate. Returns nothing. Description duplicates the specified symbol. Dom.Duplicatesymbol...

  • Page 184

    184 fireworks javascript api arguments where specifies which rectangle to check for elements. To find the elements under a single point (similar to selecting with the subselection tool), set left equal to right and top equal to bottom. To find elements within a rectangle (similar to drag-selecting w...

  • Page 185

    Document functions 185 dom.Enabletextantialiasing() availability fireworks mx. Usage dom.Enabletextantialiasing(antialias) arguments antialias a boolean value to turn anti-aliasing on ( true ) or off (false ). Returns nothing. Description turns anti-aliasing on or off for the selected blocks of text...

  • Page 186

    186 fireworks javascript api dom.Enterpaintmode() availability fireworks 3, with the argument newselectionmask added in fireworks mx. Usage dom.Enterpaintmode({newselectionmask}) arguments newselectionmask an optional bitmap selection mask. When newselectionmask is not null, the selection is set on ...

  • Page 187

    Document functions 187 dom.Exitpaintmode() availability fireworks 3. Usage dom.Exitpaintmode() arguments none. Returns nothing. Description leaves bitmap mode. Has no effect if fireworks is not in bitmap mode. Dom.Exportoptions.Loadcolorpalette() availability fireworks 3. Usage dom.Exportoptions.Loa...

  • Page 188

    188 fireworks javascript api dom.Exportoptions.Savecolorpalette() availability fireworks 3. Usage dom.Exportoptions.Savecolorpalette(fileurl) arguments fileurl a string, which is expressed as a file://url, that specifies the name of the file to which the color panel should be saved. Do not specify a...

  • Page 189

    Document functions 189 description exports the document as specified. 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...

  • Page 190

    190 fireworks javascript api dom.Filterselection() availability fireworks 3. Usage dom.Filterselection(liveeffect) arguments liveeffect an effect object (see “effect object” on page 41 ). Returns nothing. Description applies the specified pixel filter to the selection. Items that are not images are ...

  • Page 191

    Document functions 191 returns nothing. Description applies the specified pixel filter to the selection as a permanent action, not as a live effect. (to apply filters that can also be live effects, you can use dom.Filterselection() .) this function always displays a dialog box. Dom.Filterselectionby...

  • Page 192

    192 fireworks javascript api arguments name a case-sensitive string that specifies the exact element name to find. To specify elements that have no name, pass null . Returns an array of elements that have the specified name, or null if no objects have the specified name. Description looks for elemen...

  • Page 193

    Document functions 193 arguments none. Returns nothing. Description flattens the selection into a single pixel image. This action is the same behavior as the merge images command. Dom.Getfontmarkup() availability fireworks 3. Usage dom.Getfontmarkup(fontattribute) arguments fontattribute acceptable ...

  • Page 194

    194 fireworks javascript api 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 “mask data type” on page 11 . Description gets the current pixel-selection mask. The...

  • Page 195

    Document functions 195 description determines whether the grid is visible. 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() availabili...

  • Page 196

    196 fireworks javascript api dom.Getsnaptoguides() availability fireworks 8. Usage dom.Getsnaptoguides() 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 fir...

  • Page 197

    Document functions 197 arguments none. Returns one of the following strings: "left" , "center" , "right" , "justify" , "stretch" , "vertical left" , "vertical center" , "vertical right" , "vertical justify" , or "vertical stretch" . Returns null if the text has multiple alignments or if the selectio...

  • Page 198

    198 fireworks javascript api dom.Hascharactermarkup() availability fireworks 3, updated in fireworks 4. Usage dom.Hascharactermarkup(tag) arguments tag acceptable values are "b" , "i" , and "u" , for bold, italic, and underline; and "fwplain" , which was added in fireworks 4, for text without charac...

  • Page 199

    Document functions 199 dom.Importfile() availability fireworks 3. Usage dom.Importfile(fileurl, boundingrectangle, bmaintainaspectratio) arguments fileurl the filename of the file to be imported, which is expressed as a file://url. Boundingrectangle a rectangle that specifies the size to make the im...

  • Page 200

    200 fireworks javascript api arguments fileurl the name of the file to be imported into the library, which is expressed as a file:// url. Baddtodoc if baddtodoc is true , the symbol is added to the library and an instance of the symbol is inserted into the center of the document. If it is false , th...

  • Page 201

    Document functions 201 this function is similar to the dom.Importsymbol api. Dom.Importsymbol places an instance of a symbol in your document—for example, when you select edit > libraries > buttons, and dom.Importsymbolbutnotasalias extracts the component elements from the selected symbol and places...

  • Page 202

    202 fireworks javascript api tparameter a floating-point value between 0 and 1 that specifies where to insert the new point in the bézier segment. Controlpointfirst , mainpoint , and controlpointlast points that specify the x,y coordinates of the preceding control point, the main point, and the foll...

  • Page 203

    Document functions 203 dom.Insertsymbolat() availability fireworks 8. 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 ...

  • Page 204

    204 fireworks javascript api dom.Joinpaths() availability fireworks 3. Usage dom.Joinpaths() arguments none. Returns nothing. Description joins the selected paths. Dom.Knifeelementsfrompoint() availability fireworks 3. Usage dom.Knifeelementsfrompoint(from, tolerance) arguments from a point that spe...

  • Page 205

    Document functions 205 dom.Knifeelementsfrompoints() availability fireworks 3. Usage dom.Knifeelementsfrompoints(from, to, tolerance) arguments from a point that specifies the x,y coordinates of the point where the user clicked and started to drag (see “point data type” on page 12 ). To a point that...

  • Page 206

    206 fireworks javascript api element an integer value that specifies the element, starting with 0 (although, to specify the current element, pass –1 here). Blink if blink is true , the element masks are linked to their elements; if false , they are unlinked from their elements. Returns nothing. Desc...

  • Page 207

    Document functions 207 returns a find object. Description creates an object of class find to perform a search-and-replace operation in a document. Dom.Makeactive() availability fireworks 3. Usage dom.Makeactive() arguments none. Returns nothing. Description makes the selected document active for edi...

  • Page 208

    208 fireworks javascript api description merges selected objects to the bitmap directly below the selected objects. Succeeds only if the object immediately below the selection is a bitmap. For more information, see “dom.Isselectiondirectlyabovebitmapobject()” on page 203 . Dom.Modifypointonpath() av...

  • Page 209

    Document functions 209 arguments typestr a string that specifies the type of blur to apply. Valid values are "linear" , "radial" , and "zoom" . Angle an integer between 0 and 359 that specifies in degrees the direction of the blur, similar to the drop shadow effect angle. Distance a floating-point v...

  • Page 210

    210 fireworks javascript api returns nothing. 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 which the element masks a...

  • Page 211

    Document functions 211 whichhandle specifies which handle to move and can be one of the following values: "start" , "end1" , "end2" , "rotate1" , or "rotate2" . (some fills ignore "end2" .) use "rotate1" or "rotate2" to rotate the end1 or end2 point around the start point. Bconstrain if the value of...

  • Page 212

    212 fireworks javascript api dom.Movepixelmaskby() availability fireworks 4. Usage dom.Movepixelmaskby(delta) arguments delta a point that specifies the x,y coordinate values by which the bitmap mode selection is moved (see “point data type” on page 12 ). For example, passing ({ x : 1 , y : 2 })move...

  • Page 213

    Document functions 213 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. Delta a point that specifies the x-,y-coordinat...

  • Page 214

    214 fireworks javascript api description if the selection contains at least one path with at least one bézier point selected, this function moves all selected bézier points on all selected paths by the specified amount. Dom.Moveselectionby() availability fireworks 3. Usage dom.Moveselectionby(delta,...

  • Page 215

    Document functions 215 arguments delta a point that specifies the x-,y-coordinate values by which the mask is moved (see “point data type” on page 12 ). For example, passing ({x : 1 , y : 2}) moves the mask 1 pixel to the right and 2 pixels down. Returns nothing. Description moves the current pixel ...

  • Page 216

    216 fireworks javascript api dom.Moveselectiontoframe() availability fireworks 3. Usage dom.Moveselectiontoframe(frameindex, bmakecopy) arguments frameindex an integer value that specifies the frame to which the selection is moved or copied, starting with 0 (although, to specify the current frame, p...

  • Page 217

    Document functions 217 elementindex a zero-based index, added in fireworks 4, that specifies the element before which the moved or copied selection should be inserted. If elementindex is omitted, the selection is placed at the top of the layer (before any other elements). Otherwise, it is an index w...

  • Page 218

    218 fireworks javascript api returns nothing. Description performs a crop operation on the selected paths. Dom.Pathexpand() availability fireworks 3. Usage dom.Pathexpand(width, miter, cap, join) arguments width a floating-point value that specifies the new width of the selected paths, in pixels. Mi...

  • Page 219

    Document functions 219 join acceptable values are "bevel" , "round" , and "miter" . Returns nothing. Description performs an inset operation on the selected paths. Dom.Pathintersect() availability fireworks 3. Usage dom.Pathintersect() arguments none. Returns nothing. Description performs an interse...

  • Page 220

    220 fireworks javascript api dom.Pathsimplify() availability fireworks 3. Usage dom.Pathsimplify(limit) arguments limit is a floating-point value that specifies how much to simplify. This value corresponds to the value in the modify > alter path > simplify dialog box. Returns nothing. Description pe...

  • Page 221

    Document functions 221 dom.Previewinbrowser() availability fireworks mx. Usage dom.Previewinbrowser(primarybrowser) arguments primarybrowser a boolean value that specifies which browser fireworks should start: the primary browser ( true ) or the secondary browser ( false ). Returns nothing. Descript...

  • Page 222

    222 fireworks javascript api dom.Redo() availability fireworks 3. Usage dom.Redo() arguments none. Returns nothing. Description reinstates the last action that was undone in the document. Dom.Redraw() availability fireworks mx. Usage dom.Redraw() arguments none. Returns nothing. Description forces t...

  • Page 223

    Document functions 223 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 a tool. Dom.Reflectselection() availability fi...

  • Page 224

    224 fireworks javascript api dom.Removeallguides() availability fireworks 3. Usage dom.Removeallguides(guidekind) arguments guidekind acceptable values are "horizontal" and "vertical" . Returns nothing. Description removes all guides of the specified type. Dom.Removebehavior() availability fireworks...

  • Page 225

    Document functions 225 description removes one or all behavior events from the selected hotspots and slices. See also dom.Addbehavior() dom.Removebrush() availability fireworks 3. Usage dom.Removebrush() arguments none. Returns nothing. Description sets the brush of the selection to none. Dom.Remove...

  • Page 226

    226 fireworks javascript api dom.Removeelementmask() availability fireworks 4. Usage dom.Removeelementmask(whatifelementisanimage) arguments whatifelementisanimage this argument is used only if the element (not the element mask) is an image. Acceptable values for whatifelementisanimage are "apply" (...

  • Page 227

    Document functions 227 dom.Removefill() availability fireworks 3. Usage dom.Removefill() arguments none. Returns nothing. Description sets the fill of the selection to none. Dom.Removeguide() availability fireworks 3. Usage dom.Removeguide(position, guidekind) arguments position a floating-point val...

  • Page 228

    228 fireworks javascript api dom.Removetransformation() availability fireworks 3. Usage dom.Removetransformation() arguments none. Returns nothing. Description removes the transformations, if any, from the selected text or instances. Dom.Reorderframe() availability fireworks 3. Usage dom.Reorderfram...

  • Page 229

    Document functions 229 example the following command moves the third frame before the first frame: fw.Getdocumentdom().Reorderframe(2, 0, false); dom.Reorderlayer() availability fireworks 3. Usage dom.Reorderlayer(layertomove, layertoputitbefore, bmakecopy) arguments layertomove a zero-based index t...

  • Page 230

    230 fireworks javascript api returns nothing. Description replaces all text items (selected and unselected) within the document that are defined as button text items with the specified string. (button text items are defined as the topmost text items on each frame.) see also dom.Replacebuttontextstri...

  • Page 231

    Document functions 231 dom.Replacetextstring() availability fireworks 3. Usage dom.Replacetextstring(newstring, uniformattrs) arguments newstring specifies the string to be used as replacement text. Uniformattrs if uniformattrs is false , each character retains the attributes of the character that w...

  • Page 232

    232 fireworks javascript api dom.Restorejpegmask() availability fireworks 4. Usage dom.Restorejpegmask() 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...

  • Page 233

    Document functions 233 returns true if the selection is inverted; otherwise false . Description restores the selection that is specified in dom.Saveselection(). See also dom.Saveselection() dom.Reversepathtextdirection() availability fireworks 3. Usage dom.Reversepathtextdirection() arguments none. ...

  • Page 234

    234 fireworks javascript api description rotates the entire document 90º, 180º, or 270º clockwise. Rotating 270º is the same behavior as rotating 90º counterclockwise. Dom.Rotateselection() availability fireworks 3. Usage dom.Rotateselection(rotationdegrees, opts) arguments rotationdegrees a floatin...

  • Page 235

    Document functions 235 description saves the document in its default location. After a successful save operation, the document’s isdirty property is cleared. Dom.Savecopyas() availability fireworks 3. Usage dom.Savecopyas(fileurl) arguments fileurl a string, which is expressed as a file://url, that ...

  • Page 236

    236 fireworks javascript api 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.Saveselection() availability fireworks 4. Usage dom.Saveselection({selectionname}, {todocument}, {...

  • Page 237

    Document functions 237 dom.Scaleselection() availability fireworks 3. Usage dom.Scaleselection(xscaleamount, yscaleamount, opts) arguments xscaleamount and yscaleamount float values that specify the amount to scale the selection in the horizontal and vertical axes. Acceptable values are 0.0 or great...

  • Page 238

    238 fireworks javascript api arguments whattodo acceptable values are "expand" , "contract" , "border" , and "smooth" . ■ use "expand" to expand the pixel selection outward by the number of pixels that are specified by amount . ■ use "contract" to reduce the pixel selection inward by the number of p...

  • Page 239

    Document functions 239 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. Brememberselection a boolean value. If true , all the el...

  • Page 240

    240 fireworks javascript api see also dom.Selectparents() 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 fireworks is in bit...

  • Page 241

    Document functions 241 dom.Selectnone() availability fireworks 3. Usage dom.Selectnone() arguments none. 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 an...

  • Page 242

    242 fireworks javascript api dom.Selectsimilar() availability fireworks 3. Usage dom.Selectsimilar(tolerance, edgemode, featheramt, combinemode) arguments tolerance an integer between 0 and 255, inclusive, that specifies the tolerance for selecting pixels. Edgemode acceptable values are "hard edge" ...

  • Page 243

    Document functions 243 arguments where a point that specifies the x,y coordinates of the pixel whose color is used to calculate the new mask (see “point data type” on page 12 ). Tolerance an integer between 0 and 255, inclusive, that specifies the tolerance for selecting pixels. Edgemode acceptable ...

  • Page 244

    244 fireworks javascript api example the following example opens a new e-mail in the default e-mail program and attaches the file foo.Png to the message: fw.Getdocumentdom().Sendemail("file:///users/andy/documents/foo.Png"); dom.Setalllayersdisclosure() availability fireworks 4. Usage dom.Setalllaye...

  • Page 245

    Document functions 245 returns nothing. Description sets the loop count of the selected instances of multiframe image symbols. Dom.Setaniminstancenumframes() availability fireworks 4. Usage dom.Setaniminstancenumframes(numframes) arguments numframes an integer that specifies the number of frames thr...

  • Page 246

    246 fireworks javascript api returns nothing. Description sets the distance, in pixels, to animate the currently selected animation element. See also dom.Converttoanimsymbol() dom.Setaniminstancerotationamount() availability fireworks 4. Usage dom.Setaniminstancerotationamount(rotationamount) argume...

  • Page 247

    Document functions 247 arguments scaleamount a positive floating-point value that specifies the amount of scaling to be applied to the animation symbol. For example, pass 50 to scale the symbol to 50% of its current size, and pass 200 to scale it to twice its current size. To specify no scaling, pas...

  • Page 248

    248 fireworks javascript api dom.Setaniminstancestartframe() availability fireworks 3, deprecated in 4 in favor of placing the animation symbol on the frame in which it should start. Usage dom.Setaniminstancestartframe(startframe) arguments startframe an integer that corresponds to the starting fram...

  • Page 249

    Document functions 249 dom.Setbrush() availability fireworks 3. Usage dom.Setbrush(brush) arguments brush a brush object (see “brush object” on page 33 ). Returns nothing. Description sets the selection to the specified brush. See also dom.Setbrushcolor() , dom.Setbrushname() , dom.Setbrushncolornte...

  • Page 250

    250 fireworks javascript api 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 the brush. Newname a string tha...

  • Page 251

    Document functions 251 dom.Setbrushncolorntexture() availability fireworks 3. Usage dom.Setbrushncolorntexture(brush, color, texture-name) arguments brush a brush object (see “brush object” on page 33 ). Color a color string (see “color string data type” on page 11 ). Texture-name the name of the te...

  • Page 252

    252 fireworks javascript api dom.Setbuttonautoslice() availability fireworks 3. Usage dom.Setbuttonautoslice(bautoslice) arguments bautoslice if bautoslice is true , automatic slicing is turned on. If bautoslice is false , it is turned off. Returns nothing. Description if the user is editing a butto...

  • Page 253

    Document functions 253 dom.Setbuttonincludeoverwhiledownstate() availability fireworks 3. Usage dom.Setbuttonincludedownstate(bincludeoverwhiledownstate) arguments bincludeoverwhiledownstate if bincludeoverwhiledownstate is true , the over- while-down state is included in the button. If bincludeover...

  • Page 254

    254 fireworks javascript api dom.Setbuttonoptions() availability fireworks 3. Usage dom.Setbuttonoptions(exportoptions, urlstring, alttagstring, targettagstring, slicename, statusmessage) arguments exportoptions an exportoptions object (see “exportoptions object” on page 58 ). Urlstring a string tha...

  • Page 255

    Document functions 255 description resets the document’s brush and fill color to the default. Dom.Setdefaultfillvector() availability fireworks 3. Usage dom.Setdefaultfillvector() arguments none. Returns nothing. Description sets the fill-vector on the selection to the default. Dom.Setdocumentcanvas...

  • Page 256

    256 fireworks javascript api dom.Setdocumentcanvassize() availability fireworks 3. Usage dom.Setdocumentcanvassize(boundingrectangle) arguments boundingrectangle a rectangle that specifies the new canvas size for the document, in pixels (see “rectangle data type” on page 12 ). Any items outside the ...

  • Page 257

    Document functions 257 description calculates the size of all the items in the document and resizes the document canvas to that size. This action is the same behavior as modify > trim canvas. Example the following command resizes the canvas to include all the items in the document, enlarging the can...

  • Page 258

    258 fireworks javascript api arguments boundingrectangle a rectangle that specifies the size to which the document should be scaled (see “rectangle data type” on page 12 ). Resolution specifies the resolution for the scaled document (see “resolution data type” on page 12 ). Returns nothing. Descript...

  • Page 259

    Document functions 259 arguments category a string that defines the name of the category of the effect. Oldname the existing name of the effect. Newname the new name to give to the effect. Returns nothing. Description sets the name for the current effect. Dom.Setelementlocked() availability firework...

  • Page 260

    260 fireworks javascript api dom.Setelementlockedbyname() availability fireworks 8. Usage dom.Setelementlockedbyname(name, block) arguments name a string that specifies the name of the element or elements to be locked or unlocked. If more than one element has the same name, the function locks or unl...

  • Page 261

    Document functions 261 description sets the rendering mode on the selected element’s element mask. Only one element can be selected when calling this function. If more than one element (or no elements) are selected when this function is called, fireworks throws an exception. Fireworks also returns a...

  • Page 262

    262 fireworks javascript api 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 an integer value that specifies the fra...

  • Page 263

    Document functions 263 dom.Setelementvisiblebyname() availability fireworks 4. Usage dom.Setelementvisiblebyname(name , bshow) 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...

  • Page 264

    264 fireworks javascript api dom.Setexportsettings() availability fireworks 3. Usage dom.Setexportsettings(exportsettings) arguments exportsettings an exportsettings object (see “exportsettings object” on page 61 ). Returns nothing. Description sets the document export settings. Dom.Setfill() availa...

  • Page 265

    Document functions 265 arguments color a color string (see “color string data type” on page 11 ). Returns nothing. Description changes the fill color of the selection to the specified color. Dom.Setfilledgemode() availability fireworks 3. Usage dom.Setfilledgemode(edgemode, featheramt) arguments edg...

  • Page 266

    266 fireworks javascript api returns nothing. Description sets the selection to the specified fill and fill color. Dom.Setfillncolorntexture() availability fireworks 3. Usage dom.Setfillncolorntexture(fill, color, texture-name) arguments fill a fill object (see “fill object” on page 64 ). Color a co...

  • Page 267

    Document functions 267 dom.Setfillplacement() availability fireworks 3. Usage dom.Setfillplacement(placement) arguments placement acceptable values are "top" and "bottom" . Returns nothing. Description sets the fill placement for selected items with fills. Dom.Setfillvector() availability fireworks ...

  • Page 268

    268 fireworks javascript api 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 12 ). Returns nothing. Description modifies the fill vectors of the selectio...

  • Page 269

    Document functions 269 dom.Setgridorigin() availability fireworks 3. Usage dom.Setgridorigin(gridorigin) arguments gridorigin a point that specifies the x,y coordinates of the document’s grid origin (see “point data type” on page 12 ). Returns nothing. Description sets the grid origin for the docume...

  • Page 270

    270 fireworks javascript api dom.Setgridcolor() availability fireworks 3. Usage dom.Setgridcolor(gridcolor) arguments gridcolor a color string (see “color string data type” on page 11 ). Returns nothing. Description sets the color used to display the grid. Dom.Setgrouptype() availability fireworks 3...

  • Page 271

    Document functions 271 dom.Setguidecolor() availability fireworks 3. Usage dom.Setguidecolor(guidecolor) arguments guidecolor a color string (see “color string data type” on page 11 ). Returns nothing. Description sets the color that is used to display normal (nonslice) guides. To set the color of s...

  • Page 272

    272 fireworks javascript api example the following command sets the text attributes of the alt tag of the selected slices to " this is my alt tag ": fw.Getdocumentdom().Sethotspotalttag("slices","this is my alt tag"); dom.Sethotspotcolor() availability fireworks 3. Usage dom.Sethotspotcolor(whattose...

  • Page 273

    Document functions 273 bmakecopy a boolean value; if it is true , the selection is copied and resized instead of moved and resized. Returns nothing. Description if the selection is a single hotspot or slice, this function moves or copies it to the specified location at the specified size. Dom.Sethot...

  • Page 274

    274 fireworks javascript api 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().Sethotspottarget("slices", "_parent"); d...

  • Page 275

    Document functions 275 description sets the hotspot text to the specified value for the hotspots and slices in the selection. Example the following command creates a slice and inserts the html text, "i am html text" : fw.Getdocumentdom().Sethotspottext("slice ","i am html text", null, true); dom.Set...

  • Page 276

    276 fireworks javascript api arguments layerindex an integer value that specifies the layer to be locked or unlocked, starting with 0 (although, to specify the current layer, pass –1 here). To lock or unlock all the layers on a frame, use the balllayers argument. Frameindex an integer value that spe...

  • Page 277

    Document functions 277 dom.Setlayersharing() availability fireworks 3. Usage dom.Setlayersharing(layerindex , sharedstatus, bunsharecopiestoallframes, bwarnuser) arguments layerindex an integer value that specifies the layer to be shared or not shared, starting with 0 (although, to specify the curre...

  • Page 278

    278 fireworks javascript api arguments layerindex an integer value that specifies the layer that should be shown or hidden, starting with 0 (although, to specify the current layer, pass –1 here). To show or hide all the layers on a frame, use the balllayers argument. Frameindex an integer value that...

  • Page 279

    Document functions 279 example the following command sets the matte color to blue: fw.Getdocumentdom().Setmattecolor(true, "#0033ff"); dom.Setpixelmask() availability fireworks 3, deprecated in 4 in favor of dom.Setselectionmask() . Usage dom.Setpixelmask(mask, howtocombinemasks) arguments mask a ma...

  • Page 280

    280 fireworks javascript api arguments before and after integers that specify the number of frames to display before and after the current one. To disable onion skinning, pass 0 for both arguments. To enable onion skinning for all frames, pass 0 for before and a large number (for example, 99,999 ) f...

  • Page 281

    Document functions 281 dom.Setquadrangle() availability fireworks 3. Usage dom.Setquadrangle(ptopleft, ptopright, pbottomright, pbottomleft, options) arguments ptopleft, ptopright, pbottomright, and pbottomleft relative coordinates of a quadrangle expressed as percentages of an arbitrary square. The...

  • Page 282

    282 fireworks javascript api arguments roundness a floating-point value between 0 and 1 that specifies the roundness to use for the corners ( 0 is no roundness, 1 is 100% roundness). Returns nothing. Description modifies the corner roundness of all the selected rectangle primitives. See also dom.Add...

  • Page 283

    Document functions 283 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” on page 12 ). Opts acceptable values are "trans...

  • Page 284

    284 fireworks javascript api description if fireworks is in bitmap mode, this function sets the pixel-selection mask of the current image to the specified mask. Dom.Setshowedges() availability fireworks 3. Usage dom.Setshowedges(bshowedges) arguments bshowedges if bshowedges is true , the show edges...

  • Page 285

    Document functions 285 dom.Setshowgrid() availability fireworks 3. Usage dom.Setshowgrid(bshow) arguments bshow if bshow is true , the grid is visible. If bshow is false , it is not visible. Returns nothing. Description specifies whether the grid is visible. Dom.Setshowguides() availability firework...

  • Page 286

    286 fireworks javascript api arguments bshow if bshow is true , the rulers are visible. If bshow is false , they are not visible. Returns nothing. Description specifies whether rulers are visible. Dom.Setshowsliceguides() availability fireworks 3. Usage dom.Setshowsliceguides(bshow) arguments bshow ...

  • Page 287

    Document functions 287 description specifies whether the slice overlay is visible. Dom.Setsliceautonaming() availability fireworks 3. Usage dom.Setsliceautonaming(bautoname) arguments bautoname if bautoname is true , automatic naming is turned on for the slice. If bautoname is false , it is turned o...

  • Page 288

    288 fireworks javascript api dom.Setslicefilename() availability fireworks 3. Usage dom.Setslicefilename(fileurl) arguments fileurl a string, which is expressed as a file://url, that specifies the name to be given to the slice. Returns nothing. Description if a single slice is selected, this functio...

  • Page 289

    Document functions 289 dom.Setslicehtml() availability fireworks 3. Usage dom.Setslicehtml(htmltext) arguments htmltext a string that specifies the html text for the slice. Returns nothing. Description if a single slice is selected, this function sets the slice’s html text. Dom.Setsliceishtml() avai...

  • Page 290

    290 fireworks javascript api arguments bsnap if bsnap is true , the tools snap to the grid. If bsnap is false , they do not. Returns nothing. Description specifies whether tools snap to the grid. Dom.Setsnaptoguides() availability fireworks 3. Usage dom.Setsnaptoguides(bsnap) arguments bsnap if bsna...

  • Page 291

    Document functions 291 newname specifies the new name for the symbol. Returns nothing. Description sets the name and symbol type of the specified symbol. Dom.Settextalignment() availability fireworks 3. Usage dom.Settextalignment(alignment) arguments alignment acceptable values alignment are "left" ...

  • Page 292

    292 fireworks javascript api description sets the anti-aliasing level for the selected blocks of text. See also dom.Enabletextantialiasing() dom.Settextautokern() availability fireworks 3. Usage dom.Settextautokern(bkern) arguments bkern if bkern is true , automatic kerning is on for the selected te...

  • Page 293

    Document functions 293 returns nothing. 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 amount of oversampling used to...

  • Page 294

    294 fireworks javascript api dom.Settextcustomantialiasstrength() availability fireworks mx 2004. Usage dom.Settextcustomantialiasstrength(strength) 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...

  • Page 295

    Document functions 295 arguments horizscale a floating-point number that describes how much to scale the text characters horizontally. A value of 1.0 is normal. Values greater than 1.0 make the characters wider, and values less than 1.0 make the characters narrower. Returns nothing. Description sets...

  • Page 296

    296 fireworks javascript api dom.Settextonpathmode() availability fireworks 3. Usage dom.Settextonpathmode(mode) arguments mode acceptable values are "rotate" , "vertical" , "skew vertical" , and "skew horizontal" . Returns nothing. Description determines how the selected text-on-a-path items are di...

  • Page 297

    Document functions 297 dom.Settextorientation() availability fireworks 3. Usage dom.Settextorientation(orientation) arguments orientation acceptable values are "horizontal left to right" , "vertical right to left" , "horizontal right to left" , and "vertical left to right" . Returns nothing. Descrip...

  • Page 298

    298 fireworks javascript api 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. Description sets the after-paragraph s...

  • Page 299

    Document functions 299 dom.Settextruns() availability fireworks 3. Usage dom.Settextruns(textruns) arguments textruns a textruns object (see “textruns object” on page 80 ). Returns nothing. Description replaces the text in the selected text blocks with the styled text that is described by the textru...

  • Page 300

    300 fireworks javascript api dom.Settextrectangle() availability fireworks 3. Usage dom.Settextrectangle(boundingrectangle) arguments boundingrectangle a rectangle that specifies the new size within which the text item should flow (see “rectangle data type” on page 12 ). Returns nothing. Description...

  • Page 301

    Document functions 301 dom.Settextrectangleautofrompoint() availability fireworks 3. Usage dom.Settextrectangleautofrompoint(anchorpoint) arguments anchorpoint a point that specifies the x,y coordinates of the location at which the text box should be anchored (see “point data type” on page 12 ). How...

  • Page 302

    302 fireworks javascript api 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 nothing. Description splits the selected paths. Compound...

  • Page 303

    Document functions 303 returns nothing. Description swaps the current brush color and current fill color. This function has no effect on any selected items. Dom.Transformselection() availability fireworks 3, updated in fireworks 4. Usage dom.Transformselection(matrix, options) arguments matrix a thr...

  • Page 304

    304 fireworks javascript api returns nothing. Description tweens between the two selected instances. Dom.Undo() availability fireworks 3. Usage dom.Undo() arguments none. Returns nothing. Description undoes the most recent step performed, as long as that step is actually undoable; meaning, if you us...

  • Page 305

    Fireworks functions 305 returns nothing. Description updates the specified linked symbol. Dom.Ungroup() availability fireworks 3. Usage dom.Ungroup() arguments none. Returns nothing. Description ungroups any grouped items in the selection. To group items, use dom.Group() . See also dom.Group() firew...

  • Page 306

    306 fireworks javascript api arguments url the url of the page appear in the browser. Any legal url (including http://, ftp://, and so on) can be passed. Fireworks does not check this argument for syntax; if you pass an illegal value, the browser does not open the url. Returns nothing. Description o...

  • Page 307

    Fireworks functions 307 arguments title an optional string that specifies a title for the dialog box that appears. If it is omitted or null , a default title appears. Startfolder an optional string that serves as the root directory for the dialog box that appears. If it is omitted or null , the brow...

  • Page 308

    308 fireworks javascript api returns nothing. Description checks the javascript api for incompatibilities. Fw.Choosebrowser() availability fireworks mx. Usage fw.Choosebrowser(primarybrowser) arguments primarybrowser a boolean value that indicates which browser to select. If primarybrowser is true ,...

  • Page 309

    Fireworks functions 309 description displays a dialog box that lets the user choose the target documents for an operation. The dialog box lets the user specify currently open files, files in the project list, or files that are explicitly selected. See also fw.Locatedocdialog() fw.Closedocument() ava...

  • Page 310

    310 fireworks javascript api returns the document object for the newly created document (see “document object” on page 14 ). Description opens a new document and selects it. Values for size, resolution, and color are the same as the current defaults. To specify values other than the defaults, use fw...

  • Page 311

    Fireworks functions 311 arguments size a point whose x value specifies the document’s width and whose y value specifies the document’s height. Both values are in pixels. Res specifies the resolution for the scaled document (see “resolution data type” on page 12 ). Backgroundcolor a color string (see...

  • Page 312

    312 fireworks javascript api description turns off debugging messages for flash commands. For a description of the flash debugging capabilities, see fw.Enableflashdebugging() on page 312 . For more information about constructing flash command panels for fireworks, see “flash panels” on page 115 . Fw...

  • Page 313

    Fireworks functions 313 returns nothing. Description turns on debugging messages for flash commands. When flash debugging is enabled, fireworks displays the command string in a dialog box every time a flash command calls mmexecute() . The fw.Enableflashdebugging() function is particularly useful for...

  • Page 314

    314 fireworks javascript api fw.Exportdirectoraslayers() availability fireworks mx. Usage fw.Exportdirectoraslayers(document, fileurl) arguments document a document object—for example fw.Documents[2] —that specifies the document to export. If document is null , the active document is exported. Fileu...

  • Page 315

    Fireworks functions 315 fw.Exportdocumentas() availability fireworks 3. Usage fw.Exportdocumentas(document, fileurl, exportoptions) arguments document a document object, for example, fw.Documents[2] , that specifies the document to be exported. If document is null , the active document is exported. ...

  • Page 316

    316 fireworks javascript api arguments docobject a document object that specifies the document that contains the frames to export (see “document object” on page 14 ). To export frames from the current document, pass null . Directoryurl the directory where the images will be placed, which is expresse...

  • Page 317

    Fireworks functions 317 returns a boolean value: true if successful; false otherwise. Description exports one image if the document contains no slice objects and multiple images if the document contains one or more slice objects. It also optionally exports html. The document is exported using the cu...

  • Page 318

    318 fireworks javascript api fw.Exportlayers() availability fireworks 4. Usage fw.Exportlayers(docobject, directoryurl) arguments docobject a document object that specifies the document that contains the layers to export (see “document object” on page 14 ). To export layers from the current document...

  • Page 319

    Fireworks functions 319 returns a boolean value: true if successful; false otherwise. Description exports a fireworks document as a photoshop document. Example the photoshop writer is controlled by the values of several preferences. See the following example for allowed values. A well-behaved script...

  • Page 320

    320 fireworks javascript api arguments docobject a document object that specifies the document to be exported (see “document object” on page 14 ). To export the current document, pass null . Flashdocumenturl the name of the macromedia flash document to be created, which is expressed as a file://url....

  • Page 321

    Fireworks functions 321 fw.Findapp() availability fireworks mx. Usage fw.Findapp(macappsignature or winexeregistryname) arguments macappsignature a macintosh-specific string that identifies the signature of the application to find, such as " mkby ". Winexeregistryname a windows-specific string that ...

  • Page 322

    322 fireworks javascript api returns the number of items that are replaced if the search is completed, or –1 if there are items in the document that remain to be searched. Description finds the next instance of the current search string and selects that section of the document. To begin a search, us...

  • Page 323

    Fireworks functions 323 arguments which-string an optional string that is included for compatibility with dreamweaver. If specified here, it must be "document" . Returns the document object for the active document, or null if no document is open. Description gets the document object for the active d...

  • Page 324

    324 fireworks javascript api returns an array like the one in the following example: [ [ "stroke", "fill", "effect" ], [ "layers", "frames", "object" ], [ "mixer", "options", "swatches", "info" ], [ "styles", "library" ], [ "find", "project log" ], [ "url" ], [ "optimize", "optimized colors" ], [ "b...

  • Page 325

    Fireworks functions 325 fw.Getfloatervisibility() availability fireworks 3. Usage fw.Getfloatervisibility(panelname) arguments panelname acceptable values are "find" , "project log" , "object" , "info" , "url" , "effect" , "history" , "mixer" , "fill" , "stroke" , "swatches" , "layers" , "frames" , ...

  • Page 326

    326 fireworks javascript api 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 o...

  • Page 327

    Fireworks functions 327 arguments prefkey a string that specifies the preference value to return. A complete list of these values is beyond the scope of this documentation, but the format of prefkey exactly matches that in the fireworks preferences file. To set a preference value, use fw.Setpref() ....

  • Page 328

    328 fireworks javascript api fw.Launchbrowserto() availability fireworks mx. Usage fw.Launchbrowserto(url) arguments url the url to open in the primary web browser. Returns nothing. Example the following command starts a browser that opens to the macromedia website: fw.Launchbrowserto("http://www.Ma...

  • Page 329

    Fireworks functions 329 the following table lists acceptable values for formatname and the file type each value represents. Returns an array of file:// urls, or null if the dialog box is canceled. Description displays a dialog box that lets the user select one or more files. Fw.Opendocument() availa...

  • Page 330

    330 fireworks javascript api bopenasnew if bopenasnew , which was added in fireworks 4, is true , the files are opened as unsaved and untitled documents. If bopenasnew is false (the default value), they are opened with their original names. This argument is optional. Bopenwithwindowhidden boolean. I...

  • Page 331

    Fireworks functions 331 returns the specified color in #rrggbbaa format (for syntax details, see “color string data type” on page 11 ). Description opens the pop-up color swatches dialog box to let the user select a color. Fw.Popupcolorpickerovermouse() availability fireworks mx. Usage fw.Popupcolor...

  • Page 332

    332 fireworks javascript api arguments none. Returns nothing. Description quits fireworks, but prompts the user to save any changed documents before exiting. Identical to fw.Quitapplication() . Fw.Quitapplication() availability fireworks 3. Usage fw.Quitapplication() arguments none. Returns nothing....

  • Page 333

    Fireworks functions 333 returns a database that is constructed from the table data. Description reads the specified table. The tables are zero-indexed. Fw.Readpanelstatefromfile() availability fireworks mx. Usage fw.Readpanelstatefromfile(filepath) arguments filepath the location of the panel state ...

  • Page 334

    334 fireworks javascript api description verifies that the selection matches the current search string and replaces it with the replacement string. See also fw.Setupfindreplace() fw.Replaceall() availability fireworks 3. Usage fw.Replaceall() arguments none. Returns the number of items replaced, or ...

  • Page 335

    Fireworks functions 335 returns nothing. Description restores the specified document to its previously saved version. Fw.Runscript() availability fireworks 3. Usage fw.Runscript(filename) arguments filename the name of the script file to execute. If filename is not a file url (that is, if it does no...

  • Page 336

    336 fireworks javascript api returns nothing. Description saves all open documents, displaying the save as dialog box for any documents that were not previously saved. Fw.Savedocument() availability fireworks 3. Usage fw.Savedocument(document, {fileurl}) arguments document a document object, for exa...

  • Page 337

    Fireworks functions 337 arguments document a document object, for example, fw.Documents[2] , that specifies the document to save. If document is null , the active document is saved. Returns the file url for the saved document, or null if the dialog box was canceled. Description displays the save as ...

  • Page 338

    338 fireworks javascript api 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 should be saved. If filename is not a file url (that is, if it does not beg...

  • Page 339

    Fireworks functions 339 fw.Setactivewindow() availability fireworks 3. 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. I...

  • Page 340

    340 fireworks javascript api panelnametoreceive a lowercase string that specifies the panel into which the panelnametomove panel should move. If panelnametoreceive is null , the panelnametomove panel moves into its own panel. Acceptable values are "find" , "project log" , "object" , "info" , "url" ,...

  • Page 341

    Fireworks functions 341 arguments panelname acceptable values are "find" , "project log" , "object" , "info" , "url" , "effect" , "history" , "mixer" , "fill" , "stroke" , "swatches" , "layers" , "frames" , "behaviors" , "optimize" , "library" , "styles" , "optimized colors" , "options" , and "toolb...

  • Page 342

    342 fireworks javascript api bvisible if bvisible is true , the specified panel is visible. If bvisible is false , the panel is hidden. Returns nothing. Description shows or hides the specified panel. Fw.Sethideallfloaters() availability fireworks 3. Usage fw.Sethideallfloaters(bhide) arguments bhid...

  • Page 343

    Fireworks functions 343 returns nothing. Description sets the value that is associated with the specified preference key. See also fw.Getpref() fw.Setupfindreplace() availability fireworks 3. Usage fw.Setupfindreplace(findspec) arguments findspec a find object (see “find object” on page 23 ). Return...

  • Page 344

    344 fireworks javascript api arguments panelname acceptable values are "find" , "project log" , "object" , "info" , "url" , "effect" , "history" , "mixer" , "fill" , "stroke" , "swatches" , "layers" , "frames" , "behaviors" , "optimize" , "library" , "styles" , "optimized colors" , "options" , and "...

  • Page 345

    Fireworks functions 345 fw.Updatehtml() availability fireworks 4. Usage fw.Updatehtml(doc , htmlurl, brecoverfromerror) arguments doc a document object that specifies the document to be used for updating the html (see “document object” on page 14 ). If doc is null , the active document is used. Html...

  • Page 346

    346 fireworks javascript api returns nothing. Description writes out the panel states (location, size, open or closed, and so on), toolbox state, and property inspector state to an xml file that is specified by the argument. Fw.Yesnodialog() availability fireworks mx. Usage fw.Yesnodialog(promptstri...

  • Page 347

    Property inspector functions 347 property inspector functions these functions control the property inspector window, which shows details about the current document or selected object. Fw.Showpiwindow() availability fireworks mx. Usage fw.Showpiwindow() arguments none. Returns nothing. Description op...

  • Page 348

    348 fireworks javascript api fw.Ispiexpanded() availability fireworks mx. Usage fw.Ispiexpanded() arguments none. Returns a boolean value: true if expanded; false otherwise. Description determines whether the property inspector window is currently expanded or minimized fw.Ispivisible() availability ...

  • Page 349

    Property inspector functions 349 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 property inspector window. Fw.Setpiposition() avail...

  • Page 350

    350 fireworks javascript api description moves the upper-left corner of the property inspector window to the specified location. Fw.Getpiposition() availability fireworks mx. Usage fw.Getpiposition() arguments none. Returns a point object that is formatted as { x: float , y: float} (see “point data ...

  • Page 351

    History panel functions 351 description clears the undo and redo stack. Fw.Historypalette.Copysteps() availability fireworks 3. 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 ...

  • Page 352

    352 fireworks javascript api fw.Historypalette.Getstepcount() availability fireworks 3. Usage fw.Historypalette.Getstepcount() arguments none. Returns the number of steps in the history panel (not a zero-based value). Description gets the number of steps in the history panel. Fw.Historypalette.Getst...

  • Page 353

    History panel functions 353 fw.Historypalette.Getundostate() availability fireworks 3. Usage fw.Historypalette.Getundostate() arguments none. Returns the string to use with fw.Historypalette.Setundostate() . Description returns a string that indicates the current undo state to be used for later call...

  • Page 354

    354 fireworks javascript api description gets the javascript equivalent of the specified steps and executes them. See also fw.Historypalette.Getstepsasjavascript() fw.Historypalette.Saveascommand() availability fireworks 3. Usage fw.Historypalette.Saveascommand(array of indexes, {filename}) argument...

  • Page 355

    Static document functions 355 returns nothing. Description sets the portion of the history panel that is selected. Fw.Historypalette.Setundostate() availability fireworks 3. Usage fw.Historypalette.Setundostate(undostatestring) arguments undostatestring the string returned by fw.Historypalette.Getun...

  • Page 356

    356 fireworks javascript api arguments name a string that specifies the name of the set of export settings to find. Returns if there is a set of export settings with the specified name, the argument returns an object that represents it; otherwise, it returns null . Description looks for a set of exp...

  • Page 357

    Using the common api 357 using the common api you can use the common macromedia api if you want commands to use a common syntax (and thus run a single command in multiple applications). You can access this api using app.Methodname() .The following methods are currently supported in fireworks and dre...

  • Page 358

    358 fireworks javascript api.

  • Page 359

    359 index a actionscript 116 cross-product extensions 99 addbehavior() 132, 133 addelementmask() 138 addframes() 138 addguide() 139 addnewhotspot() 140 addnewimage() 140, 141, 142 addnewimageviacopy() 141 addnewimageviacut() 142 addnewlayer() 142 addnewline() 143 addnewoval() 143 addnewrectangle() 1...

  • Page 360

    360 index clearsteps() 350 clipcopy() 159, 160 clipcopyaspaths() 160 clipcopyformats() 160 clipcut() 161 clippaste() 161 clippasteasmask() 162 clippasteattributes() 163 clippastefromchanneltochannel() 164 clippasteinside() 164 cloneselection() 165 close() 166 closedocument() 309 color string 11 colo...

  • Page 361

    Index 361 dom.Applycharactermarkup() 153 dom.Applycurrentfill() 153 dom.Applyeffects() 154 dom.Applyfontmarkup() 155 dom.Applystyle() 155 dom.Arrange() 156 dom.Attachtexttopath() 156 dom.Changeguide() 157 dom.Changesliceguide() 158 dom.Clearjpegmask() 159 dom.Clipcopy() 159 dom.Clipcopyaspaths() 160...

  • Page 362

    362 index dom.Moveselectionby() 214 dom.Moveselectionmaskby() 214 dom.Moveselectionto() 215 dom.Moveselectiontoframe() 216 dom.Moveselectiontolayer() 216 dom.Moveselectiontonewlayer() 217 dom.Pathcrop() 217 dom.Pathexpand() 218 dom.Pathinset() 218 dom.Pathintersect() 219 dom.Pathpunch() 219 dom.Path...

  • Page 363

    Index 363 dom.Setgridorigin() 269 dom.Setgridsize() 269 dom.Setgrouptype() 270 dom.Setguidecolor() 271 dom.Sethotspotalttag() 271 dom.Sethotspotcolor() 272 dom.Sethotspotrectangle() 272 dom.Sethotspotshape() 273 dom.Sethotspottarget() 273 dom.Sethotspottext() 274 dom.Setlayerdisclosure() 275 dom.Set...

  • Page 364

    364 index effectlist object 48 effectlist property 94 effects, finding and replacing 24 efileisreadonly 19 efilenotfound 19 egenericerroroccurred 19 egroupdepth 19 eillegalthreadaccess 19 einternalerror 19 element object 49 elementmask object 56 elements, changing 10 elementsat() 183 elowonmem 19 en...

  • Page 365

    Index 365 flash wrapper extension 118 flattendocument() 192 flattenselection() 192 fonts, finding and replacing 24 frame object 65 frameindex argument 131 framenlayerintersection object 66 func 102 fw and fireworks class names 305 fw.Browsedocument() 305 fw.Browseforfileurl() 306 fw.Browseforfolderu...

  • Page 366

    366 index g gaussian blur property (effect object) 45 get 102 getdefaultmoveparms() 76 getdocumentdom() 322 getdocumentpath() 323 getfloatergroupings() 323 getfloaterposition() 324 getfloatervisibility() 325 getfontmarkup() 193 gethideallfloaters() 325 gethtmlfileforscript() 326 getnumberoftables() ...

  • Page 367

    Index 367 l launchapp() 327 launchbrowserto() 328 layer object 67 layerindex argument 131 levels (effect object) 46 linkelementmask() 205 loadcolorpalette() 187 m makeactive() 207 makefind() 206 makegoodnativefilepath() 356 mask 11 matrix 12 mergedown() 207 metafile.Htt 80 methods,global 12 mm_nbgro...

  • Page 368

    368 index slices 91 style 76 text 55 textattrs 78 textruns 79 texture 56 objects accessing within documents 32 classification 92 core objects 13 selected 92 opendocument() 329 optional arguments 10 p palette 132 panel 132 panels, custom 115 path object 54 pathattrs object 68 pathcrop() 217 pathexpan...

  • Page 369

    Index 369 rpcmethods.Destroyautoreleasepool() 111 rpcmethods.Releaseobject() 112 rpcmethods.Removefromautoreleasepool() 112 runscript() 335 s saturation properties (effect object) 45 save() 234 saveall() 335 saveascommand() 354 savecolorpalette() 188 savecopyas() 235 savedocument() 336 savedocumenta...

  • Page 370

    370 index setlayersharing() 277 setlayervisible() 277 setmattecolor() 278 setonionskinning() 279 setopacity() 280 setpiposition() 349 setpixelmask() 279 setpref() 342 setquadrangle() 281 setrectroundness() 281 setrectsides() 282 setselection() 354 setselectionbounds() 283 setselectionmask() 283 sets...

  • Page 371

    Index 371 v values 10 w working with selected elements 132 write() 13 write_html() 13 writepanelstatetofile() 345 x xml 100 y yesnodialog() 346 z zero-based indexes 131.

  • Page 372

    372 index.