Adobe 65011817 Extended User Guide - Page 13
Using the common API, Working with selected objects
UPC - 883919157368
View all Adobe 65011817 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 13 highlights
Last updated 12/8/2009 EXTENDING FIREWORKS 9 The Fireworks Object Model Palette or panel Several API functions reference the History panel (see "History panel functions" on page 318). Throughout the Fireworks documentation and online help, the term palette is reserved for discussions of a color palette, and the term panel is used to refer to the floating windows that are available within Fireworks. Therefore, when the function name contains palette, the descriptions refer to a panel. Using the common API You can use the common Adobe API if you want commands to use a common syntax (and thus run a single command in multiple applications). You can access this API using app.methodName().The following methods are currently supported in Fireworks and Dreamweaver to let developers easily create commands for both applications. app.toggleFloater() Identical to fw.toggleFloater(). app.setFloaterVisibility() Identical to fw.setFloaterVisibility(). app.getRootDirectory() Identical to the Fireworks object property appDir •. app.browseDocument() Identical to fw.browseDocument(). Note: The app.getRootDirectory() function is useful if you want to use app.browseDocument() to view files within the applications's folder. 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. In other words, you can write a command that will get or set the value of an object's properties whether the user selects a Text object, or an Image object, or any other recognized object. In Fireworks, a recognizable object is classified as one of the following element types: • Hotspot • SliceHotspot (basically, a slice) • Path • Group • Instance • Text