If the client is not written in one of the languages for which Macromedia provides a client RPC library, the client implementer must create or generate the stubs. For information about how to do this, see The Fireworks Object Model. The application object (with object ID fw) is of the Fireworks class (for other objects with reserved IDs, see Object IDs). All objects returned by the server contain the class name as an attribute. Given an object's class, the client can determine what methods and properties it has based on the Fireworks JavaScript DOM. The DOM document also gives the prototypes of the methods and properties of a class. The client can use the DOM document to determine the number and types of method parameters. The DOM document uses more types in its prototypes than the RPC mechanism defines. So, several of the documented types collapse to one RPC type.
In addition to static properties, objects of certain classes can also have dynamic properties. The Fireworks Object Model documents dynamic properties and specifies whether the dynamic properties are read only. Most dynamic properties are on lists (for example, the BehaviorsList class). The properties take an integer or string as a property name, and return a value based on the element associated with the property name.
The following table shows the mapping between the Fireworks Object Model data types and the RPC data types.
| DOM data type | RPC data type | Example | Description |
|---|---|---|---|
|
array |
array |
|
Types map identically. |
|
Boolean |
Boolean |
|
Both types are identical. Both contain only two values: |
|
color |
string |
|
A color is a string with nine characters. It has the format #RRGGBBAA. |
|
date |
dictionary |
|
A date is a dictionary with the following subelement keys: year, month, day, hour, minutes, and seconds. All six elements are integer data types. |
|
dictionary |
dictionary |
|
Types map identically. |
|
float |
float |
|
Types map identically. |
|
integer |
integer |
|
Types map identically. |
|
matrix |
dictionary |
|
A matrix is a dictionary that contains one subelement key: |
|
null |
null |
|
Types map identically. |
|
object |
server object, or dictionary |
|
For an object type, the client can simply specify a server object. However, for certain objects (such as objects of the |
|
point |
dictionary |
|
A point is a dictionary with two subelement keys: |
|
rect |
dictionary |
|
A rect is a dictionary with four subelement keys: |
|
resolution |
dictionary |
|
A resolution is a dictionary with two subelement keys: |
|
string |
string |
|
Types map identically. |
|
URL |
string |
|
A URL is a string. It usually starts with |
|
void |
void |
|
Types map identically. |
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_10.htm