Показать сообщение отдельно
Старый 26.12.2013, 00:02
shmaser вне форума Посмотреть профиль Отправить личное сообщение для shmaser Найти все сообщения от shmaser
  № 7  
Ответить с цитированием
shmaser
 
Аватар для shmaser

Регистрация: Aug 2010
Сообщений: 22
Разве так не работает?
Код AS3:
public function eatingAnimation( ):void {
                clip.gotoAndPlay("animation");
		        clip.addEventListener(Event.ENTER_FRAME, animation);
        }
Код AS3:
public function animation(e:Event):void {	
			if (clip.currentFrame == clip.totalFrames) {
			      trace("ВСЕ КАДРЫ ПРОИГРАНЫ");
			      // КАКИЕ-ТО ДЕЙСТВИЯ
			      clip.removeEventListener(Event.ENTER_FRAME, animation);
			}
		}