Groups | Blog | Home
all groups > flash actionscript > january 2006 >

flash actionscript : help with very simple easing script


shambo
1/16/2006 9:46:02 PM
trying to make a very simple google map type ui.

can anyone help me add motion easing to this script?

on (release) {
map._y += -10;
}

ddefenba
1/16/2006 9:56:48 PM
There are some great Tweening engines out there that can make this type of
stuff very easy. We've had a lot of success with this one:
http://laco.wz.cz/tween/?page=docs/install
It's easy to install and makes what you're trying to do as easy as a
map.slideTo() function. Check it out.
shambo
1/16/2006 10:30:46 PM
thanks for the help!

i'd prefer to understand how the as works, and therefore am wondering if
anyone can provide the as or a link to a source where i could find it. does
seem like it's too complicated + although nothing i've tried seems to work.

i've been looking everwhere for this. thanks again!
FlashTastic
1/16/2006 11:09:19 PM
Okay, here we go:

Check out:

http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.ht
m?context=LiveDocs_Parts&file=00001500.html

And here's some code you can test with your map:

Cheers,
FlashTastic




import mx.transitions.Tween;

//Tween(instanceName:String, property:String, tweenType:Function(),
startPos:Number, endPos:Number, duration:Number, useSeconds:Boolean)
var Tween1:Tween = new
Tween("map","_y",mx.transitions.easing.Regular.easeOut,this._y,this._y+10,1,true
)
AddThis Social Bookmark Button