Learning Game

Tutoriaux - Swish

| Introduction | Swish websites | Interface description |
| Practise 1 | Practise 2 | Practise 3 | Practise 4 |

Practise 4

SPRITE in a button

A Sprite is an animation clip inside the animation.

His big advantage is having it's own timeline, independently of the main animation.

  1. Write a text on the Scene_2
  2. Convert it to Button
  3. Create the different states of the Button (up, over, down)
  4. On the Outiline panel, select the content of the Over state
  5. Convert it to SPRITE (Modify > Convert > Convert to Sprite).

  6. Click on Sprite on the Over State. You have now a new Scene (here called Sprite) with its own timeline.

  7. Select your text and ad an effect. Don't forget to put a stop() at the end of the sprite's timeline.

Using of Sprite

  1. Go back to Scene_1
  2. Insert a Text
  3. Convert it to Sprite
  4. In the Outline panel, select the text of this sprite.

  5. Apply an effect to the Text
  6. On the last Frame of the Sprite's timeline, ad a Script: gotoAndPlay(1).



  7. Test your animation.
    Thanks to this action, the animation inside the sprite will loop. Because this animation has an independant timeline, the sprite will go on to loop, in spite of the stop() on the main timeline!

Export your animation

If you save your movie, you will have a .SWI file: this is the working file of Swich. But to be displayed in a Web page, your animation has to be exported.