About scripts
Scripts are a powerful way to create or change the behavior of a LiveMotion file. A script is a programmatic way of controlling objects in a composition by using loops, mathematical functions, and other conditional logic such as "if/then" statements. Scripting for LiveMotion is object-oriented and uses JavaScript as the programming language. There are two types of scripts that you can use: - A LiveMotion JavaScript (also known as an ActionScript) is a set of instructions embedded in a LiveMotion composition. When the composition is exported as an SWF file, any LiveMotion JavaScripts in the composition are included. (LiveMotion JavaScripts are not included in any other export format.) A LiveMotion JavaScript tells the file and the Macromedia Flash Player what to do. It can be interactive and can create animations that can't be done through LiveMotion's user interface. For example, you could use a LiveMotion JavaScript to create a ping-pong game in which the user's interaction could not be predicted. You could not do this with an automation script, because you couldn't predict the direction of the ball ahead of time, and so you couldn't create keyframes for every possible position of the ball and the player's paddle. For a full description of the capabilities of LiveMotion JavaScripts and techniques for building them, see the Adobe LiveMotion 2.0 Scripting Guide.
- Automation scripts and Live Tabs affect the active composition. An automation script lets you do repetitive or complex tasks in an active composition. Although you can do these actions through the LiveMotion user interface, application scripts let you perform numerous instructions automatically and add conditional logic for how the instructions are performed. A Live Tab is simply an automation script that has a user interface attached to it. Live Tabs appear as a palette or dialog box. For example, a Live Tab could be an automation script with a palette that lets you draw a 12-point star shape or perform a batch of commands on selected objects. Adobe expects to make numerous automation scripts and Live Tabs available on the English-language Adobe Xchange Web site (http://www.actionxchange.com).
|