Description
The animation object allows to define a frame-by-frame animation, simlarly to a GIF but also supporting:
- Audio track
- Alpha channel
- Full playback control
Double-click on the animation object on stage to open the frames editor to add/change frames, other properties are available in the selection inspector.
In the animation editor, click [+] to add frames, [-] to remove selected frames. Frames in the list on the left size can be reordered via drag and drop, thumbnails size can be adjusted with the slider. You can use the play button to play the animation, eventually muting it.
Properties
Animation object supports most of the Generic Object Properties, plus the ones listed below. To edit properties of an animation object, select it and use the selection inspector at the right of your project window.
Frames | List of frames of the animations, click to edit |
Image Rendering Format | One between Default (Project Settings) , PNG , JPEG . Each frame of the animation will be re-rendered to fit the object perfectly, so you can decide to use JPEG for reduced file size, PNG to fully support transparency or stick with your project settings |
FPS | Frames per second to define the playback speed |
Repeat | Number of times the animation playback should be repeated before considering it complete, use 0 to loop forever |
Play End Behavior | One between Stay on Last Frame and Go to First Frame. Defines what frame is displayed when animation playback is complete, repectively the last or the first frame of the animation |
Sound | Audio asset for the audio track. Will be played together with the animation |
Events
Animation object triggers all Generic Events. To edit event handlers for an animation, select it and use the Interactivity Panel on the right side of the project window.
Actions
Animation object can be used as target of most Generic Actions, plus the following:
Play Animation
Plays an animation object and, eventually, its audio. If playback was previously stopped, it will restart where it left off.
The action is marked as completed immediately if the animation loops forever (Repeat property of the animation set to 0), otherwise it will wait until the last frame is displayed (or Stop Animation
action is called) then pass the execution to the next action in the list, even if the audio track is still playing
Properties
Target | Animation object to play |
Stop Animation
Stops playback of an animation object immediatelty, leaving it on the last displayed frame, and marks running Play Animation
actions targeting the same object as completed.
Properties
Target | Animation object to stop |
Play animation ➜ self
in the Load
event of the animation to play it automatically when the page loads