Цитата:
|
Сообщение от MIX-er
дай взглянуть на твой код плз)))
|
mov = function(n, segment):Void {
if(mov_status == 0) {
mov_status = 1;
o.n = n;
o.speed = 0;
o.a = 0.002; o.omega = 0;
o.gamma = 0; o.segment = segment;
Interval = setInterval(movier, 1);
}
}
movier = function():Void {
for (i=0;i<5;i++) {
clip = clip["s"+(i+1)];
if (Math.abs(clip.omega) >= 2*Math.PI) clip.omega = 0;
clip.omega += o.speed*o.n;
omega = clip.omega;
clip._x = coord_x(omega);
clip._y = coord_y(omega);
clip._height = height(clip._y);
clip._width = clip._height*(clip_width/clip_height);
clip._alpha = alpha(clip._y);
clip.depth_num = depth(clip.number);
clip.swapDepths(clip.depth_num);
updateAfterEvent();
}
o.speed += o.a;
o.omega += o.speed;
o.gamma += o.speed;
if (o.gamma >= segment_length-segment_length/10) { f_number(o.n); o.gamma = 0; }
if (o.omega >= Math.abs(o.segment*segment_length)) { stoping(); }
}
stoping = function():Void {
mov_status = 0;
clearInterval(Interval);
}