MACROMEDIA FIREWORKS 8-EXTENDING FIREWORKS Specifications

Browse online or download Specifications for Software MACROMEDIA FIREWORKS 8-EXTENDING FIREWORKS. MACROMEDIA FIREWORKS 8-EXTENDING FIREWORKS Specifications User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 35
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
189
Chapter 11
Adobe Fireworks includes a rich extensibility. model that allows advanced users to
create sophisticated custom panels (Flash panels) using a combination of JavaScript
and Flash. In fact, many of the panels that ship with Fireworks, including the
Align
panel and the
Path panel, are Flash panels. Because the Fireworks engineering team
has exposed practically every aspect of Fireworks through a JavaScript extensibil-
ity model, you’re really only limited by your imagination (and technical abilities, of
course).
This chapter is designed to give you an understanding of the entire Flash panel
development process and presents a workflow I have refined through developing
a number of Fireworks panels, including the
Fireworks to XAML Exporter panel and
the
Gradient panel. You’ll see how to author Fireworks JavaScript and integrate that
JavaScript in both Flash- and Flex- based custom panels for Fireworks.
This chapter is written for advanced users of both Fireworks and Flash and may be
a bit overwhelming if you do you not have programming experience. If you’re not
a programmer, you may choose to skim through the chapter and gain a greater
appreciation of what goes into creating custom panels that enhance your Fireworks
experience. However, if you are a programmer and are ready to enhance to your
favorite design application (Fireworks of course!), you need to be proficient with the
following environments and programming languages:
EXTENDING FIREWORKS:
DEVELOPING AN EFFECTIVE WORKFLOW
USING JAVASCRIPT AND FLASH
Page view 0
1 2 3 4 5 6 ... 34 35

Summary of Contents

Page 1 - USING JAVASCRIPT AND FLASH

189Chapter 11Adobe Fireworks includes a rich extensibility. model that allows advanced users to create sophisticated custom panels (Flash panels) usin

Page 2 - Foundation terminology

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

Page 3 - Defining a Fireworks workflow

199EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH This simple example illustrates an effective workflow for develop

Page 4 - What just happened?

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

Page 5 - Where is the command stored?

201EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11-6 shows the new layout with all of the NumericSteppers

Page 6 - Language ➤ JavaScript so

202CHAPTER 11With all of the controls in place, with the exception of the ColorPicker, it’s now time to update the ActionScript event

Page 7 - Step 2: Creating a Flash UI

203EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11‑8. ColorPicker MovieClip added to the stageWith the

Page 8

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

Page 9 - TextField in Flash

205EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH complex projects that include large amounts of JSF. Instead of co

Page 10

206CHAPTER 11option on this tab. When enabled, the FDT will watch for file changes and automatically perform the conversion in the background. When yo

Page 11 - Commands menu

207EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH + " rect.left = left;\n"+ " rect.top = top;\n&

Page 12 - Components

190CHAPTER 11 JavaScript: Intermediate to advanced ActionScript 2 or 3: Intermediate to advanced Adobe Flash: Intermediate to advanced Adobe Flex:

Page 13

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

Page 14

209EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH // TODO: Manually update positions of all other elements on st

Page 15

210CHAPTER 11The AlignmentManager can manage only objects that are MovieClips, so the header artwork has been converted to a MovieCl

Page 16 - Add Rect, and the

211EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH function onFwActiveSelectionChange(){ MMExecute("alert(&ap

Page 17 - XAML Exporter

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

Page 18

213EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH ActionScript 3 still supports the concept of “including” external

Page 19 - Updating the Draw Rect panel

214CHAPTER 11The changes here are minor and no different than any ActionScript 2 to ActionScript 3 migration. With the event handlers in place

Page 20

215EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH // onFwActiveSelectionChange Event Handler// Get the color of the

Page 21

216CHAPTER 11Notice that we are handling both the initialize event and the creationComplete event. The init() method specified as the event handler fo

Page 22 - Detecting change of selection

217EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11‑14. Authoring DrawRect in Flex Builder

Page 23 - Detecting tool changes

191EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH All of these actions that you have performed are core a

Page 24 - Property inspector

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

Page 25

219EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Packaging and deploying your panelThroughout this chapter, we’

Page 26

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

Page 27

221EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Learning the Fireworks object modelThis chapter has primarily con

Page 28

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

Page 29

223EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH SummaryWe’ve covered a lot in just one chapter! You should now ha

Page 30

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

Page 31

193EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Where is the command stored?Fireworks commands that are saved

Page 32 - CHAPTER 11

194CHAPTER 11 Command Panels folder: all users Windows XP: C:\Program Files\Adobe\Fireworks CS4\Configuration\Command Panels Windows Vista: C:\Prog

Page 33 - The FWAPI_Inspector panel

195EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH var cornerRadius = 0;fw.getDocumentDOM().addNewRectanglePrimitive

Page 34

196CHAPTER 11Steps 3 and 4: Importing and executing the JSFFlash panels pass JSF to Fireworks via the MMExecute() method in ActionScript. When an

Page 35

197EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH Figure 11‑3. Copying JavaScript to a TextField in Flash

Comments to this Manuals

No comments