A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Controlling Speed

  1. #1
    .....<<>>>.....
    Join Date
    Apr 2000
    Posts
    120

    Unhappy

    I have a movie clip I'm duplicating twice to drop from the top to the bottom of the stage- currently all 3 copies drop at the same rate, I'd like to get them to drop at different speeds, and I'm finding it to be a little challenging.... Thanks for any help.....

  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    515
    on each clip:

    onClipEvent(load){
    top=0; //or wherever you want the clip to start
    bottom=400; //or whatever the height of your movie
    speed=10; //vary to change speed of drop
    _y=top;
    }

    onClipEvent(enterFrame){
    if(!stopped){
    _y+=speed;
    if(_y>bottom){
    _y=bottom;
    stopped=true;
    }
    }
    }

    should do it.

  3. #3
    .....<<>>>.....
    Join Date
    Apr 2000
    Posts
    120
    Thanks! I'll give it a try

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