http://jeitomoleque.uol.com.br/ - http://www.nutella.com.br/
Eu criei um movie clip e um botão
na time line usei isto
function mov () {
this.onEnterFrame = function () {
if(_root.clientesmc._y >= 246){ //limite que o mc deve atingi
_root.clientesmc._y -= 20; //velocidade que ele vai anadar
}else{
stop();
delete this.onEnterFrame;
}
}
}
e no botão
on(release){
mov();
}
Sendo que não funciona,
obrigado,
Consegui, abaixo segue o código
onClipEvent(enterFrame)
{
tempo = 20;
}
onClipEvent(enterFrame)
{
endX = 400 - _xmouse;
_x = _x + (endX - _x) / tempo;
}
onClipEvent(enterFrame)
{
if (this._x < -130)
{
this._x = -130;
}
if (this._x > 950)
{
this._x = 950;
}
}
onClipEvent(enterFrame)
{
tempo = 20;
}
onClipEvent(enterFrame)
{
endY = 150 - _ymouse;
_y = _y + (endY - _y) / tempo;
}
onClipEvent(enterFrame)
{
if (this._y < 200)
{
this._y = 200;
}
if (this._y > 250)
{
this._y = 250;
}
}
Edição feita por: miguelgustavo, 20/04/2009, 15:51.