segunda-feira, agosto 21, 2006

Motion de Scroll com easing

troque os instances pelo que vc precisar. Esse scroll abaixo só funciona para mover o objeto em questão para a esquerda:

function scrollRight(){
posX = 0
divEasing = 50
multiply = 0.65
distMax = -9000

obj_mc.onRollOver = function(){
objMove_mc.onEnterFrame = function(){
this._x -= (((posX++)*2) + this._x) / divEasing
if(this._x <= distMax){
this._x = distMax
posX = null
}
}
}
obj_mc.onRollOut = function(){
objMove_mc.onEnterFrame = function(){
this._x -= (posX--) / divEasing
if(posX <= 0){
posX = 0
this._x = null
}
}
}
posX = 0
}

Nenhum comentário: