189Chapter 11Adobe Fireworks includes a rich extensibility. model that allows advanced users to create sophisticated custom panels (Flash panels) usin
198CHAPTER 11Adding the Mouse.onRelease event handlerWith all of the pieces in place on the Flash stage, it’s now time to add an event handler to the
199EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH This simple example illustrates an effective workflow for develop
200CHAPTER 11 Figure 11‑4. Flash TextBlock housing JSF codeIt’s now time to update the UI to support the added flexibility provided by the new JSF.Sta
201EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11-6 shows the new layout with all of the NumericSteppers
202CHAPTER 11With all of the controls in place, with the exception of the ColorPicker, it’s now time to update the ActionScript event
203EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11‑8. ColorPicker MovieClip added to the stageWith the
204CHAPTER 11In this method, the Flash Drawing API is used to draw a rectangle directly into an empty MovieClip named rectTarget_mc. rectTarget_mc is
205EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH complex projects that include large amounts of JSF. Instead of co
206CHAPTER 11option on this tab. When enabled, the FDT will watch for file changes and automatically perform the conversion in the background. When yo
207EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH + " rect.left = left;\n"+ " rect.top = top;\n&
190CHAPTER 11 JavaScript: Intermediate to advanced ActionScript 2 or 3: Intermediate to advanced Adobe Flash: Intermediate to advanced Adobe Flex:
208CHAPTER 11By default, Flash SWFs scale when resized—not the behavior expected by users. Go ahead and try resizing the Draw Rect panel you jus
209EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH // TODO: Manually update positions of all other elements on st
210CHAPTER 11The AlignmentManager can manage only objects that are MovieClips, so the header artwork has been converted to a MovieCl
211EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH function onFwActiveSelectionChange(){ MMExecute("alert(&ap
212CHAPTER 11In this section, we’ll first show you how to use ActionScript 3 in Flash to author custom panels, and then introduce you to Flex panel au
213EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH ActionScript 3 still supports the concept of “including” external
214CHAPTER 11The changes here are minor and no different than any ActionScript 2 to ActionScript 3 migration. With the event handlers in place
215EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH // onFwActiveSelectionChange Event Handler// Get the color of the
216CHAPTER 11Notice that we are handling both the initialize event and the creationComplete event. The init() method specified as the event handler fo
217EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11‑14. Authoring DrawRect in Flex Builder
191EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH All of these actions that you have performed are core a
218CHAPTER 11And, just like setting the publish path in Flash, we always set the Flex build path of the active proj-ect to the Fireworks Command Pane
219EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Packaging and deploying your panelThroughout this chapter, we’
220CHAPTER 11 Figure 11‑16. Saving an extension in the Adobe Extension ManagerNow that you have an MXP file, you can either double- click the file to
221EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Learning the Fireworks object modelThis chapter has primarily con
222CHAPTER 11 Figure 11‑18. Using the FWAPI_Inspector panel to browse the Fireworks DOMYou can download the panel and its source file at Aaro
223EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH SummaryWe’ve covered a lot in just one chapter! You should now ha
192CHAPTER 11Using the History panel to create a commandNot only does the History panel show the recent actions you’ve performed, it lets you save a s
193EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Where is the command stored?Fireworks commands that are saved
194CHAPTER 11 Command Panels folder: all users Windows XP: C:\Program Files\Adobe\Fireworks CS4\Configuration\Command Panels Windows Vista: C:\Prog
195EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH var cornerRadius = 0;fw.getDocumentDOM().addNewRectanglePrimitive
196CHAPTER 11Steps 3 and 4: Importing and executing the JSFFlash panels pass JSF to Fireworks via the MMExecute() method in ActionScript. When an
197EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11‑3. Copying JavaScript to a TextField in Flash
Comments to this Manuals