1. Event target object: objects that can receive events, such as player, document, element, timeline object Its properties and methods: - bind(eventName, handler): bind the handler function to the specified event so that it will be called when the event occurs on the target object + eventName: name of the event, e.g. 'sceneactivate', 'click' + handler is a function with two parameters: function(doc, e) {/*...*/} doc: Saola Animate document that the event target belongs to (it's not the JavaScript object window.document) e: the event object - unbind(eventName, handler): remove the handler from the event + unbind(eventName): remove all handlers bound to the event + unbind(): remove all handlers bound to any event of the target element 2. Player object: AtomiSaola It's a global object that manages all Saola Animate documents embedded in a web page. In functions in Functions pane (including normal functions and event handlers), AtomiSaola can be referred to as Saola. In case the player is embedded in a iframe, iframeElement.contentWindow.AtomiSaola can be used to access it from outside of the iframe if they have the same domain, or be configured to allow access. It's an event target object, that supports the following events: - 'createdocument': this event occurs when a Saola Animate document is created, just before the document 'create' event. Its properties and methods: - docs: array of all Saola Animate documents, including top level documents (the main document of a project) and documents in symbol elements - topDocs: array of all top level Saola Animate documents. One page usually contains only one top level document, except when more documents are embedded by user scripts. If the page contain only one top level document, AtomiSaola.topDocs[0] can be used to get the document from outside of Saola Animate functions. - openDoc(docDataPath, container, options): create a document from the data file at docDataPath, and embed it into the container + docDataPath: path/url to the document data file + container: DOM element or its id + options: optional options object, may contain the following properties center: center document on container, can be one of 'horizontal', 'vertical', 'both', or 'none'. Default value is 'horizontal' paused: whether pause or auto play the document. Default value is false for top level documents autofit: whether scale the document to fit the container, default value is false resourceFolder: resource folder path relative to the html file, default value is 'resources' + return the new document - findDoc(container): find the document embedded in a container (usually a div tag). Container parameter can be the DOM element or its id. 3. Document object: doc parameter in function event handlers, or document object gets from player object - destroy(): remove the document from the page - layoutIfNeeded(): update the document layout when the container is resized. This function is called automatically when the browser window is resized. 4. Element object - dom: DOM element associated with this Saola Animate element. It can be used to get element properties. Setting properties should be done through Saola Animate element methods if they're available. - getText(): get element text in HTML format - setProperty(propertyName, propertyValue): set element property, supported properties include: className, title, tabIndex, display, overflow, opacity, cursor text, fontFamily, fontSize, fontStyle, fontWeight, textColor, textHighlightColor, textDecoration, wordSpacing, letterSpacing translateX, translateY, translateZ, rotateX, rotateY, rotateZ, scaleX, scaleY, scaleZ, skewX, skewY, transformOriginX, transformOriginY, transformOriginZ - setProperty(properties): set multiple properties at once, properties parameter is an object {propertyName: propertyValue} - getSymbolDoc: get the symbol document embedded in a symbol element. This method is only available for symbol elements 5. Timeline - getLabelTimestamp(label): Get the timestamp in milliseconds at a label. Return undefined if the label doesn't exist