• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Tweening Buttons

You can tween buttons just as you do any other kind of symbol instance and create moving menus and interfaces that still respond to the pointer and carry out actions assigned to them.

To apply a motion tween to a button:

From the Insert menu, choose New Symbol, and create a button symbol.

Return to the main movie Timeline, and drag an instance of the button symbol onto the Stage.

Select the instance, open the Actions panel in Normal mode, and add an action to your button instance (Figure 4.18).

Figure 4.18. The action attached to this balloon button instance makes Flash go to the label called happy birthday and begin playing.

Create a motion tween as you normally would for a graphic instance.

Insert new keyframes, move or transform each instance, and then choose Motion Tween in the Property Inspector.

On the main Timeline, at the end of your motion tween, add the action gotoAndPlay(1).

Flash creates an endless loop for your motion-tweened button (Figure 4.19).

Figure 4.19. This balloon floats up and down in a constant loop.

Create a spot on the Timeline where the action assigned to the button instance takes the user.

Test your movie.

Throughout its tween, the button instance is active and responds to your pointer.


  • Tweened button instances use the actions that are assigned to the first keyframe of the motion tween (Figure 4.20). Assign an action to the button instance first and then create your motion tween so all subsequent inserted keyframes will contain the same instance with the same actions.

    Figure 4.20. Actions assigned to tweened instances. The actions assigned to the first instance of any tween are the ones that are followed.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint