103
CHAPTER 5
Fireworks JavaScript API
This chapter lists JavaScript functions supported by Macromedia Fireworks MX 2004 that enable
you to create useful Fireworks extensions and customized Fireworks menus. Almost any task that
the user can accomplish in Fireworks with the menus, tools, or floating panels can be done
programmatically using JavaScript.
Using Fireworks API functions
Three categories of API functions are described in this chapter: Document functions, History
panel functions, and Fireworks functions. The following rules apply to all functions.
Zero-based indexes
Some functions take an
index
argument which is a zero-based, one-dimensional array. That
means a value of
0
represents the first item in the array,
1
represents the second item, and so on.
For example, the following command deletes the second layer of the active Fireworks document:
fw.getDocumentDOM().deleteLayer2;
Functions that take a
frameIndex
argument can be passed
–1
to indicate the current
frame. Similarly, functions that take a
layerIndex
argument may be passed
–1
to indicate the
current layer.
Passing null values
In general, passing a
null
value to a function causes an exception to be thrown. A few functions
do allow
null
as an argument; such cases are noted in the function descriptions.
Working with selected elements
Many API functions in this chapter refer to a “selection” or to “selected items.” These terms refer
to Fireworks elements, such as text boxes or images, that are currently selected. In most cases, the
functions work even if only one item is selected. If a function requires more than one selected
item, this is noted in the description of the function.
Содержание DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER
Страница 1: ...Extending Fireworks...
Страница 4: ...4 Contents...
Страница 8: ...8 Chapter 1 Extending Fireworks Overview...
Страница 102: ...102 Chapter 4 Auto Shapes...
Страница 284: ...284 Chapter 5 Fireworks JavaScript API...