Показать сообщение отдельно
Старый 26.07.2007, 23:37
goarcade вне форума Посмотреть профиль Отправить личное сообщение для goarcade Найти все сообщения от goarcade
  № 10  
Ответить с цитированием
goarcade

Регистрация: Sep 2006
Сообщений: 32
как тебе вот такой код?
Код:
var target:MovieClip = sym1;
var tempTarget:MovieClip = target;
speed=0.1
t=0;posx0 = cl._x;posy0 = cl._y;posr0 = cl._rotation;
posr0 = (posr0-Math.floor(posr0/360)*360)-360;
sym1.onRollOver = function ():Void {target = this}
sym2.onRollOver = function ():Void {target = this}
sym3.onRollOver = function ():Void {target = this}

onEnterFrame = function ():Void
{
	if(target!=tempTarget)
	{
		tempTarget=target;
		t=0;posx0 = cl._x;posy0 = cl._y;posr0 = cl._rotation;
		posr0 = (posr0-Math.floor(posr0/360)*360)-360;
	}
	t+=speed;
	if(t>1)t=1;
	var dx:Number = target._x-posx0;
	var dy:Number = target._y-posy0;
	cl._x = posx0+dx*t;
	cl._y = posy0+dy*t;
	cl._rotation=posr0+(360-posr0)*t;
}