
221
EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH
Learning the Fireworks object model
This chapter has primarily concerned itself with defining an effective workflow for developing Fireworks
panels. We’ve shown you how to do this in both ActionScript 2 and 3, using both Flash and Flex. Along the
way, we’ve used certain Fireworks methods and handled Fireworks events that you probably didn’t even
know existed. You may have wondered how we knew that calling fw.popupColorPickerOverMouse()
in JSF would launch the color picker or how calling fw.selection[0] would give us a handle to the
first selected object. We learned our way around the Fireworks object model using the following
resources and methods:
The Extending Fireworks documentation
The History panel method—demonstrated at the beginning of this chapter
The FWAPI_Inspector panel
Online samples, tutorials, and articles
The Extending Fireworks documentation
The Extending Fireworks documentation is available online and can be found by selecting Help ➤
Fireworks Help
from the main menu (or directly via http://help.adobe.com/en_US/Fireworks/10.0_
Using/). Select
Extending Adobe Fireworks CS4 from the main menu on the left. This documenta-
tion covers all of the methods, events, objects, and properties available to you as a Fireworks panel
author.
The History panel method
The History panel method introduced at the beginning of this chapter is a fast way to come up to
speed with the methods that Fireworks is calling as you use the tool. You simply perform steps within
Fireworks that you want to know how to achieve via JSF, and then select the steps you just performed
in the
History panel (Window ➤ History). With the steps of interest selected, click the Copy button
to copy the JSF directly to your clipboard. You can then paste the JSF into your authoring tool and
review the code. Learn more about the methods used by looking them up in the Extending Fireworks
documentation.
The FWAPI_Inspector panel
Learning to navigate the Fireworks object model is a fundamental step in Fireworks panel develop-
ment. Often, navigating the Extending Fireworks documentation can be confusing. Fortunately, Aaron
Beall has written a panel that displays the property tree of the currently selected element on the stage
(see Figure 11-18). You can see the values for each property and even edit the properties that aren’t
read- only. Using this panel, you can learn the hierarchy of Fireworks objects and properties and pre-
dictably code against selected objects.
Kommentare zu diesen Handbüchern