1. Home
  2. Computing & Technology
  3. Animation

Flash Fortune-Teller/Random Sentence Generator with User Input

By , About.com Guide

8 of 8

The last thing to do is return to your main stage/timeline and create a button to move the playhead of the movie clip ahead to the second frame so that the script runs:
on (release) {
_root.fortunte.gotoAndPlay(2) ;
}

And with that, you should have a working fortune teller/random sentence generator.

Things to remember:

  • Make sure to include the full path name of all variables to the root level (such as _root.name instead of name) to make sure that Flash knows where to look for your information.
  • Don’t forget that you’re using the text property of the dynamic text boxes to fill in the dynamically generated message.
  • Everything that isn’t a variable inside each dynamically generated message needs to go inside quotes – yes, even spaces and punctuation; you must define everything, and make sure that every time you switch from variable to text or even variable to variable, it must be concatenated using the + sign.
  • Explore Animation
    About.com Special Features

    Holiday Central

    What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

    Family Tech Center

    Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

    1. Home
    2. Computing & Technology
    3. Animation
    4. Flash Animation Tutorials
    5. Flash Fortune-Teller/Random Sentence Generator with User Input

    ©2009 About.com, a part of The New York Times Company.

    All rights reserved.