Controlling a Flash movie using functions

The Flash Asset Xtra provides a rich set of properties and methods that give you precise control over the way Authorware displays a Flash movie and the interaction between Authorware and the Flash movie.

When you add a Flash movie to a piece (either linked as an external file or imported into the piece), you can set some of the most common Flash movie properties in the Flash Asset Properties dialog box. The properties you select in the dialog box are used as defaults for the sprite you create from the sprite icon. For example, if you change the Rotation setting to 90 degrees in the Flash Asset Properties dialog box, Authorware displays the Flash movie rotated 90 degrees in the Presentation window.

You can also change the properties of a Flash movie using the SetIconProperty and the SetSpriteProperty functions. To call methods of a Flash movie, use the CallIcon and the CallSprite functions.

Sprite Icon properties The SetIconProperty function affects sprite icon properties. When you set a sprite icon property, it's the same as changing the value of the property in the Flash Asset Properties dialog box. The new value becomes the default setting for the Flash Player Movie icon you've assigned it to. After you change the property, every time Authorware encounters the Flash Player Movie icon, it uses the new value when it plays the icon's Flash movie. Furthermore, changes made to a sprite icon property are immediately broadcast to the icon's Flash movie if it's on the screen. For example, if you use the SetIconProperty function to set the scale of a Flash Player Movie icon to 50 percent, the icon's Flash movie is immediately scaled to 50 percent. To prevent a change to a sprite icon property from being broadcast to its Flash movie, set the sprite icon's broadcastProps property to false. (For more information, see broadcastProps.)

Sprite properties The SetSpriteProperty function affects sprite properties. Setting a sprite property for a Flash movie sprite—a Flash movie that's playing on the screen—changes the property of the movie without affecting the default setting of the icon that contains the movie. The change takes place immediately.

Sprite Icon methods The CallIcon function calls a method of the sprite icon—it executes a function of the Flash movie icon.

Sprite methods The CallSprite function calls a method of the sprite—it executes a function of the Flash movie sprite that's playing on the screen.

Some properties and methods, such as those controlling the way a Flash movie streams from an external file, apply only to a Flash Player Movie icon. Many other properties and methods apply to both sprite icons and their sprites. The Flash Asset Xtra Command Reference indicates whether a property applies to sprite icons or sprites.

In addition, some sprite icon properties, such as the flashRect and the frameRate, are valid only when the Flash movie's header has streamed into memory.

To Table of Contents Back to Previous document Forward to next document