logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Full Schedule
g
g Flash and Animation Site

BellaOnline's Flash and Animation Editor

g

Stopping Animation with ActionScript 3


In the last tutorial, we added the second line of text to our ecard FlashR animation. If you test the animation, you will see that the "Happy Thanksgiving" text drops down and bounces on the stage followed by the "From Our House To Yours" text sliding in from the right.

However, we barely have time to read the second line of text before the animation repeats. We have three options to solve this problem. We could add a stop code that will stop the animation on the last frame. A second option is to add a free more blank frames to the animation in order to allow the text to display for a few seconds before the animation repeats. The third option is to stop the animation, as in the first option, but also add a replay button. Because option three incorporates the other two options, it's a good choice for a tutorial.

Open your ecard animation into Flash CS4.

  1. We will first add a few blank frames at the end of the Timeline. Our last frame is 89, let's add 16 blank frames which will give us a total of 105 frames. On the Background layer, right-click on Frame 105 and choose Insert Frame.

  2. On the Happy Thanksgiving 2 layer, right-click on Frame 105 Insert a Frame.

  3. We also need to extend the From Us layer. On Frame 89, select the text and click Edit - Copy. Now add a new layer named "From Us 2". On Frame 90, insert a Keyframe and then click Edit - Paste In Place. Still on this new layer, right-click on Frame 105 and Insert a Frame.

  4. Test your movie and you will be able to see the text for the extra 15 frames before it repeats.

  5. Our next step is a stop the movie on Frame 105. We need to add an Actions layer on the Timeline. Add a new layer at the top of the Timeline and name it "Actions". On this Actions layer and on Frame 105, right-click and add a Keyframe. Open the Actions panel (Window Actions). Type in the following code.

    Stop();

That takes care of the first two options. Now we are ready to add a replay button.

← Back


Join us in the Flash forum.




Add Stopping+Animation+with+ActionScript+3 to Twitter Add Stopping+Animation+with+ActionScript+3 to Facebook Add Stopping+Animation+with+ActionScript+3 to MySpace Add Stopping+Animation+with+ActionScript+3 to Del.icio.us Digg Stopping+Animation+with+ActionScript+3 Add Stopping+Animation+with+ActionScript+3 to Yahoo My Web Add Stopping+Animation+with+ActionScript+3 to Google Bookmarks Add Stopping+Animation+with+ActionScript+3 to Stumbleupon Add Stopping+Animation+with+ActionScript+3 to Reddit



 



RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the Flash and Animation Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.

g


g features
Particle System - Line Emitter

Animating Color of Text in Motion 5

Animating Color of Shapes in Motion 5

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor