A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Actionscript to gradually slow down movieclip tweens?

  1. #1

    Actionscript to gradually slow down movieclip tweens?

    I'm trying to find the effect of something slowing down the closer it gets to where it is going to stop. Rather than try and moviclip my way through it, I'm going to see if I cant just paste some code on each item.

    Know anything about how to do this?
    surtsey@oddrealm.net

  2. #2
    Multimedia Developer
    Join Date
    Jun 2001
    Location
    Ireland
    Posts
    41
    Flash provides 'easing' for motion tweens, which wil either give the impression of speeding up at the end or slowing down, - depending of whether you use 'in' or 'out' easing. This is useful for instance when tweening a ball bouncing - so you can give the impression of downforce gravity slowing it on the way up, and hence speeding it up on the way down. If this is adequate for your needs then use it, but for more complex scenarios where tweening is not possible, its more effective and better visually to use a coded gravity/momentum solutions. there are several examples of these in the open source 'movies' section of the main site.
    Just cos you're paranoid, does'nt mean that they aint out to get you

  3. #3
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    ON the movieclip.....

    onClipEvent(load){
    // Initial position
    _root.xpos=25;
    }
    onClipEvent(enterFrame){
    this._x+=(_root.xpos-this._x)/7;
    }


    ON a button to tell the destination.........

    on(release){
    xpos=450;
    }

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  4. #4
    Ah thankyou. So this actually positions the mc also?

    I am assuming that an enterframe action will work for the second part as well.

    Thankyou for you'r help.
    surtsey@oddrealm.net

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