PDA

View Full Version : ease : pixels instead of _y



Voccart
September 12th, 2004, 10:30 AM
hi people


i'm using the following code to ease mc's



MovieClip.prototype.easingY = function(toY){
this.onEnterFrame = function(){
this._y -= (this._y-toY)/3;
if(this._y > toY-4 && this._y < toY+4){
this._y = toY;
delete this.onEnterFrame
} } }


now i have to provide a Y position to move to...is it possible to change this code so that instead of providing a Y position i give it a amount of pixels to move (up/down)? ex. move 100 pixels UP from current y or move 222 pixels down..

thanks

Voccart
September 12th, 2004, 02:47 PM
lol

i found the answer :D HERE (http://www.kirupaforum.com/forums/showthread.php?t=44403&page=2&pp=15&highlight=bounce).....I did read that post like 5 times yesterday and did not see it!!! realy stupid.. need sleep