Using Animated GIFs in Authorware Import an animated GIF into Authorware by choosing Insert > Media > Animated GIF. Authorware supports the GIF89a format. GIFs must have a global color table to be imported. You can import an animated GIF within an Authorware file or link to an external file. An animated GIF can play at its original frame rate, or at a different rate that you specify. You can make an animated GIF play direct-to-screen, meaning that it is immediately displayed on the Presentation window instead of being first composed in an off-screen buffer with other sprites. A direct-to-screen GIF take less time to load, but you cannot place other sprites in front of it or use a display mode other than Opaque. To set properties for an animated GIF:
Scripting Reference You can
The Animated GIF Xtra provides the following new properties and functions to control Animated GIF icons and sprites. | ||||||||||||||||||||||||
directToStage
|
||||||||||||||||||||||||
Syntax |
SetIconProperty(IconID@"IconTitle", #directToStage, state) GetIconProperty(IconID@"IconTitle", #directToStage ) |
|||||||||||||||||||||||
Type | Icon
property
|
|||||||||||||||||||||||
Description | This
property affects how an Animated GIF is displayed in the Presentation window.
The state parameter can have these values:
TRUE The Animated GIF plays in front of all other layers. No objects can appear in front of the animation. FALSE The Animated GIF can appear in any layer in the Presentation window. The
|
|||||||||||||||||||||||
Example | This
script sets the setting of the directToStage
property of an Animated GIF named "GIF89" to TRUE :
SetIconProperty(@"GIF89", #directToStage,TRUE) |
|||||||||||||||||||||||
Syntax | S etIconProperty(IconID@"IconTitle",
#fixedRate, rate)
|
|||||||||||||||||||||||
Type | Icon
property
|
|||||||||||||||||||||||
Description | This
property determines the frame rate for the specified animated GIF. The animated
GIF's tempo should be set to fixed
using either the Animated GIF Icon Properties dialog box or the playbackMode
property.
|
|||||||||||||||||||||||
Example | The
following example sets the animated GIF icon named "GIF89" to play back
at 25 frames per second:
SetIconProperty(@"GIF89", #playbackMode, #fixed)þ-- set the playbackmode to fixed SetIconProperty(@"GIF89", #fixedRate, 25) |
|||||||||||||||||||||||
Syntax | SetIconProperty(IconID@"IconTitle", #linked,
state)
|
|||||||||||||||||||||||
Type | Icon
property
|
|||||||||||||||||||||||
Description | This
property determines if the media in the animated GIF icon is embedded into
Authorware or linked to an external file. The state parameter can be:
| |||||||||||||||||||||||
TRUE The animated GIF is linked to an external file. | ||||||||||||||||||||||||
FALSE The animated GIF is embedded into the Authorware file. | ||||||||||||||||||||||||
Example |
This example sets the animated GIF icon's media to be a linked external file:
|
|||||||||||||||||||||||
Syntax | SetIconProperty(IconID@"IconTitle", #internalpathname,
file)
|
|||||||||||||||||||||||
Type | Icon
property
|
|||||||||||||||||||||||
Description | This
property specifies the linked Animated GIF file to display at the specified
icon title. The file parameter can be an absolute path, a relative path,
or a URL.
The
|
|||||||||||||||||||||||
Example | The
following examples show three ways to specify the internalpathname
property:
|
|||||||||||||||||||||||
Syntax | CallSprite( IconID@"IconTitle",
#pause)
|
|||||||||||||||||||||||
Type | Xtra
function
|
|||||||||||||||||||||||
Description | This
function freezes the animation for the specified animated GIF.
|
|||||||||||||||||||||||
Example | This
script pauses the animation in the sprite icon named "GIF89."
CallSprite(@"GIF89", #pause) |
|||||||||||||||||||||||
Syntax |
|
|||||||||||||||||||||||
Type | Icon
property
|
|||||||||||||||||||||||
Description | This
property specifies the tempo setting for the animated GIF at the specified
icon title. The
playbackmode
property can be tested and set.
The mode parameter can be:
| |||||||||||||||||||||||
#normal Plays at the animated GIF's original rate. | ||||||||||||||||||||||||
#fixed
Plays at the frame rate set using either the Animated GIF Xtra Icon Properties
dialog box or the fixedRate
property. |
||||||||||||||||||||||||
#lockstep Plays the animated GIF at the global rate for the Authorware piece. | ||||||||||||||||||||||||
Example | The
following example shows thow to set the playbackmode property:
|
|||||||||||||||||||||||
Syntax | CallSprite( IconID@"IconTitle",
#resume)
|
|||||||||||||||||||||||
Type | Xtra
function
|
|||||||||||||||||||||||
Description | This
function plays the animation for the specified animated GIF. Use this function
to play animations that are paused using the pause
function.
|
|||||||||||||||||||||||
Example | This
script plays the animation in the sprite icon named "GIF89."
|
|||||||||||||||||||||||
Syntax | CallSprite( IconID@"IconTitle",
#rewind)
|
|||||||||||||||||||||||
Type | Xtra
function
|
|||||||||||||||||||||||
Description | This
function resets the specified animated GIF to the first frame.
|
|||||||||||||||||||||||
Example | This
script rewinds the animation in the sprite icon named "GIF89."
CallSprite(@"GIF89", #rewind)
|