Document functions

As discussed in an earlier section, you get and set document properties by calling functions as methods of the document’s Document Object Model (DOM) (see Accessing a Fireworks document). Methods that operate on a document’s DOM are listed in this section as dom.functionName(). However, you cannot simply type dom.functionName(). In place of dom, you must type fw.getDocumentDOM() or fw.documents[documentIndex]. For example:

  • How a function looks in this manual: dom.addNewHotspot()

  • How you must type it:

    fw.getDocumentDOM().addNewHotspot(); // operates on active document

    or

    fw.documents[documentIndex].addNewHotspot(); // operates on specified document