User Guide
12 Chapter 2: The Fireworks Object Model
Resolution data type
The format for resolution is
{pixelsPerUnit: float, units: string}. Acceptable values for
units are "
inch" or "cm". For instance, dom.setDocumentResolution(resolution) could look
like the following example:
fw.getDocumentDOM().setDocumentResolution({pixelsPerUnit:72, units:"inch"});
Global methods
The following table lists the global Fireworks methods, along with their argument data types and,
where appropriate, acceptable values and notes.
Core objects
This section describes the four core objects that are always available: Document, Errors, Files,
and Find.
Note: For information on how to format nonstandard data types, such as rectangle or point, see
“Formatting nonstandard data types” on page 11.
Method Data type Notes
alert(message)
string Displays a string in a modal alert box, along
with an OK button. Returns nothing.
confirm(message)
string Displays a string in a modal alert box, along
with OK and Cancel buttons. Returns
true if
OK is clicked,
false if Cancel is clicked.
prompt(caption, text) string, string Prompts the user (with the string that is
specified by text) to enter a string in a modal
dialog box; the dialog box is titled with the
string that is specified by caption. Returns
the string entered if OK is clicked,
null if
Cancel is clicked.
write(arg1, arg2, ..., argN) string Same as WRITE_HTML; WRITE_HTML was
created to let you differentiate HTML output
calls from other JavaScript calls in
your code.
WRITE_HTML(arg1, arg2, ..., argN) string Available only when exporting. Converts
each argument to a string and writes it to the
HTML output file. To enter an end-of-line
character, use
"\n"; this is converted to the
correct line ending for your platform. For
more information, see “HTML export
objects” on page 64.