A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: help with accell/decell.

  1. #1
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409

    help with accell/decell.

    hi,

    i have a movie clip, that i want to move from point A to point B. with acceleration and deceleration

    the basic script was movieclip._y = movieclip._y+1 in a loop, but this just moves the clip normally.

    now i want to accelerate the clip until it reaches position 130 and then decelerate until it reaches 260...

    any suggestions ?

    thanks

  2. #2
    always for rent
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    307
    if (movieclip._y<=130){
    movieclip._y+=nMove++;
    } else if (movieclip._y>130 && movieclip._y<260){
    movieclip._y+=nMove--;
    } else {
    movieclip._y=260;
    }

    there are better ways of doing it, but that should work.

    jeremy

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