-
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?
-
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
-
Senior Member
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;
}
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|