Показать сообщение отдельно
Старый 29.08.2007, 00:16
aciton вне форума Посмотреть профиль Отправить личное сообщение для aciton Найти все сообщения от aciton
  № 6  
Ответить с цитированием
aciton

Регистрация: May 2006
Сообщений: 29
в общем криво но работает
Код:
	xx = Stage.width/2-mc2._xmouse;
	yy = Stage.height/2-mc2._ymouse;
mc.onRelease = function() {
	
	if (xx<Stage.width/2-mc2._xmouse && yy<Stage.height/2-mc2._ymouse {
		moving2(Stage.width/2-mc2._xmouse-20,Stage.height/2-mc2._ymouse-20);
	}
	if (xx>Stage.width/2-mc2._xmouse && yy<Stage.height/2-mc2._ymouse) {
		moving2(Stage.width/2-mc2._xmouse+20,Stage.height/2-mc2._ymouse-20);
	}
	if (xx<Stage.width/2-mc2._xmouse && yy>Stage.height/2-mc2._ymouse) {
		moving2(Stage.width/2-mc2._xmouse-20,Stage.height/2-mc2._ymouse+20);
	}
	if (xx>Stage.width/2-mc2._xmouse && yy>Stage.height/2-mc2._ymouse) {
		moving2(Stage.width/2-mc2._xmouse+20,Stage.height/2-mc2._ymouse+20);
	}
	moving(Stage.width/2-mc._xmouse,Stage.height/2-mc._ymouse;
	xx = Stage.width/2-mc2._xmouse;
	yy = Stage.height/2-mc._ymouse;
};