Adobe Flash Professional CS6 Adobe Flash Professional CS6 Classroom In A Book | Page 246
3 To import custom code snippets, choose Import Code Snippets XML from the
Options menu in the Code Snippets panel.
Choose the XML file that contains the custom snippets and click Open. Your
Code Snippets panel will now contain all the snippets from the XML file.
Playing animation at the Destination
So far, this interactive restaurant guide works by using the gotoAndStop() com-
mand to show information in different keyframes along the Timeline. But how
would you play an animation after a user clicks a button? One way is to use the
command gotoAndPlay() , which moves the playhead to the frame number or
frame label specified by its parameter and plays from that point.
Creating transition animations
Next, you will create a short transition animation for each of the restaurant guides.
Then you’ll change your ActionScript code to direct Flash to go to each of the key-
frames and play the animation.
1 Move the playhead to the label1 frame label.
Adobe FLAsh ProFessIonAL Cs6 CLAssroom In A book
237