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:
1 | Select an animated GIF icon on the flowline and choose Modify > Icon > Properties.
2 | Use the Icon Title field to view or edit the icon name.
3 | To set specific animated GIF settings, click Options...
4 | To change the file of a linked external media file, enter a new pathname in the Import field or click Browse to choose a new file. Click Internet to enter a new URL for a file to be imported from the Internet.
5 | To achieve the fastest playback rate, turn on Direct to Screen.
| When Direct to Screen is on, you can only use Opaque mode and you cannot place any sprites on top of the animated GIF sprite. Displaying multiple direct-to-screen GIFs in the Presentation window may reduce playback performance.
6 | Choose an option from the Tempo pop-up menu.
| Normal Plays at the GIF's original rate.
| Fixed Plays at the frame rate you enter on the right.
| Lock-Step Plays every frame at the rate specified as the global rate for your piece.
Authoring and distributing pieces with the Animated GIF Asset Xtra The installation program for the Animated GIF Asset Xtra places the following Xtras files in your Authorware Xtras folder:
Windows | Macintosh | Purpose
AnimGIF Authoring.x32 | N/A | This file provides support for Animated GIF files while authoring movies in Authorware. Don't distribute this file with Authorware pieces. This file isn't licensed for redistribution.
AnimGIF.x32 | Animated GIF Asset | Distribute this file with any Authorware pieces you create using the Animated GIF Asset Xtra.
For more information about using Xtras and distributing Authorware pieces made with them, see "Distributing Xtras" in the "Authoring Basics" section of the Authorware 5 Attain Help Pages. Scripting Reference You can `pause, resume and rewind` an Animated GIF or set its properties by scripting. When you add a new Animated GIF icon to the flowline, the sprite takes the current property values stored with the sprite icon. When you change the icon's properties, its sprite is affected even when it isn't currently playing in the Presentation window. Changing a sprite's properties with `SetSpriteProperty` will affect the sprite only if it appears in the Presentation window. 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 `directToStage` property can be tested and set.
| Example | This script sets the setting of the `directToStage` property of an Animated GIF named "GIF89" to `TRUE`:
    SetIconProperty(@"GIF89", #directToStage,TRUE)
fixedRate
| Syntax | `S` `etIconProperty(IconID@"IconTitle", #fixedRate, rate)` `GetIconProperty(IconID@"IconTitle", #fixedRate)`
| 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)
linked
| Syntax | `SetIconProperty(IconID@"IconTitle", #linked, state)` `GetIconProperty(IconID@"IconTitle", #linked)`
| 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: `SetIconProperty( @"GIF89", #linked, TRUE )` internalPathName
| Syntax | `SetIconProperty(IconID@"IconTitle", #internalpathname, file)` `GetIconProperty(IconID@"IconTitle", #internalpathname)`
| 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 `internalpathname` property can be tested and set.
| Example | The following examples show three ways to specify the `internalpathname` property: `SetIconProperty(@"GIF89", #internalpathname, "sample.gif") SetIconProperty(@"GIF89", #internalpathname, "C:\\sample.gif") SetIconProperty(@"GIF89", #internalpathname, ¬ "http://www.animatedGIF.com/test/sample.gif")` pause
| 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)
playbackMode
| Syntax | `SetIconProperty(IconID@"IconTitle", #playbackmode, mode)` `GetIconProperty(IconID@"IconTitle", #playbackmode)`
| 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: `SetIconProperty(@"GIF89", #playbackmode,#normal)` resume
| 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." `CallSprite(@"GIF89", #resume)` rewind
| 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)