A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Need variable to take value during animation

Threaded View

  1. #1
    Tractor Veteran
    Join Date
    Jul 2003

    Need variable to take value during animation

    I'm trying to do a modest walking script.

    At this point, if you press the down key quickly and let go, the character will complete the animation of one stride and then stop, which is what I wanted to do.

    The character will move whenever "vertMove" contains a value, and will stop moving if it goes to zero.

    Inside the "WalkD" movie clip I've set vertMove=2 at the beginning of the animation, and then made it zero at the end of the stride. So in theory, he should keep moving at a speed of 2 until the stride animation completes.

    This isn't true though. If you tap the down key once he sometimes just moves a little bit and stop while the animation completes. Adding dynamic text to watch the vertMove variable shows that it returns to zero before the animation is over, even though I ONLY mess with the value inside of that animation...

    Any idea what I'm doing wrong?
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center