Fireworks??™ wealth of JavaScript functions also
exposes its control to Dreamweaver??”and the first condition for interoperability is handled. To create a
strong link between programs, Dreamweaver engineers expanded on the Fireworks API used in the
Optimize Image command, where Dreamweaver actually launches a streamlined, headless version of
Fireworks. This operation is controlled by a C-level extension called FWLaunch. Here??™s a step-by-step
description of how Dreamweaver is typically used to communicate with Fireworks:
1. The user selects a command in Dreamweaver.
2. Dreamweaver opens a dialog box.
3. After the user has filled in the dialog box and clicked OK, the command begins to execute.
4. All user-supplied parameters are read and used to create a JavaScript scriptlet or function, which
serves as instructions for Fireworks.
788
Including Multimedia Elements Part V
5. If used, the scriptlet is stored on the disk.
6. Fireworks is launched with a command to run the Dreamweaver-created scriptlet or function.
7. Fireworks processes the scriptlet or function while Dreamweaver tracks its progress via a cookie
on the user??™s machine.
8. After Fireworks has finished, a positive result is returned.
The Fireworks API includes several error codes for use if problems, such as a full disk, are
encountered.
Pages:
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362