77
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 MX 2004 that leverage existing Fireworks MX 2004
functionality. They may use JavaScript APIs for adding image-editing functionality to those
applications, as well as custom Fireworks panels developed in Macromedia Flash MX 2004 to
enhance the functionality of Fireworks. For example, a developer may want to create an
ActionScript command so that a user can replace text in an image without leaving the current
movie. Similarly, a Flash developer may create a panel so that a Fireworks user can easily create
spirals and other nonstandard shapes repeatedly.
Cross-product architecture
The Fireworks cross-product communication architecture provides a new way for extension
developers to create Fireworks-related features for other applications. With this new architecture,
your extensions allow a user to perform common image-editing operations (cropping, rotating,
adjusting color, blurring, and almost all Fireworks operations) without leaving the current
application or opening Fireworks.
XML and remote procedure calls (RPC)
Applications written with Flash Actionscript 2.0 or C++ applications can control Fireworks MX
2004 by sending JavaScript instructions (called remote procedure calls, or RPC) encoded in XML
through a local socket. The Fireworks RPC gives other applications access to functionality
previously restricted to JavaScript programs running inside Fireworks. The RPC mechanism
exposes the Fireworks JavaScript DOM through XML and a TCP socket connection. In this way,
an application (written with Actionscript 2.0 or C++) running on the same machine as Fireworks
(only local connections are allowed to the loopback address) can be used to open Fireworks
documents, slice them, optimize them, and then export them. Users can also create a new
Fireworks document through another application, draw in the document, and preview it in the
browser. Nearly anything that can be accomplished with a JavaScript program running in
Fireworks can now be done through remote procedure calls.
Currently, Dreamweaver MX 2004 does not have the Flash Player 7 plug-in supporting
ActionScript 2.0 and Fireworks remote procedure calls. Dreamweaver extensions that use remote
procedure calls need to be written in a combination of JavaScript communicating with C++.
Note:
Fireworks excludes functionality related to starting other applications or manipulating non-
Fireworks related files (for more information, see
“Security” on page 85
).
Summary of Contents for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER
Page 1: ...Extending Fireworks...
Page 4: ...4 Contents...
Page 8: ...8 Chapter 1 Extending Fireworks Overview...
Page 102: ...102 Chapter 4 Auto Shapes...