Applications written with Flash ActionScript 2.0 or C++ applications can control Fireworks 8 by sending JavaScript instructions, called remote procedure calls (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 computer 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.
Note: Fireworks excludes functionality related to starting other applications or manipulating non-Fireworks related files (for more information, see Security).
Fireworks RPC transactions pass XML between an RPC client and the Fireworks RPC server built in to Fireworks 8. The RPC client is any supported program that connects to Fireworks through a TCP stream on port 12124. The Fireworks RPC server is the internal code that listens on TCP port 12124 and then handles client requests. During the RPC transaction, information flows from client to server:
Note: The RPC client is not required to disconnect after each XML request. The RPC client can keep the connection open and send additional XML requests (the TCP resubmission timeout is 30 seconds). However, only one XML request can be outstanding at a time. In other words, the RPC client cannot send a second request until it receives a reply to the first request, because there is no queueing mechanism to hold pending requests.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_03_c3.htm