E_M_Master
17.03.2006, 16:19
Подскажите, как реализовать масштабирование во время "перетаскивания" пользователем объекта видеоклипа?
Пробовал вставить в обработчик события на нажатие кнопки мыши на клипе временной интервал с функцией, меняющей масштаб но не работало... см последние 2 строчки кода...
ТО что делал:
on (press)
{
function movescale (obj)
{
this.camerax=-50;
this.cameray=0;
this.cameraz=424;
dscreenc(this,_root._xmouse,_root._ymouse);
fullxyzevaluate(this);
min=Math.sqrt(this.camerax*this.camerax+(this.cameraz-177)*(this.cameraz-177));
this._xscale=(this.distance/min)*100+25;
this._yscale=(this.distance/min)*100+25;
}
this.startDrag(true,0,210,656,456);
ctID1 = setInterval(movescale(this),50);
}
Пробовал вставить в обработчик события на нажатие кнопки мыши на клипе временной интервал с функцией, меняющей масштаб но не работало... см последние 2 строчки кода...
ТО что делал:
on (press)
{
function movescale (obj)
{
this.camerax=-50;
this.cameray=0;
this.cameraz=424;
dscreenc(this,_root._xmouse,_root._ymouse);
fullxyzevaluate(this);
min=Math.sqrt(this.camerax*this.camerax+(this.cameraz-177)*(this.cameraz-177));
this._xscale=(this.distance/min)*100+25;
this._yscale=(this.distance/min)*100+25;
}
this.startDrag(true,0,210,656,456);
ctID1 = setInterval(movescale(this),50);
}