Тема: Баг флэша?
Показать сообщение отдельно
Старый 21.09.2010, 21:14
Rzer вне форума Посмотреть профиль Отправить личное сообщение для Rzer Посетить домашнюю страницу Rzer Найти все сообщения от Rzer
  № 5  
Ответить с цитированием
Rzer
 
Аватар для Rzer

блогер
Регистрация: Feb 2007
Адрес: Spb
Сообщений: 612
Записей в блоге: 8
Отправить сообщение для Rzer с помощью ICQ
For the coders, and others working in Flash, is the ability to use addFrameScript to perform actions when a frame is fully initialized and children are on stage, similar to onLoad() in AS2, where-as use of ENTER_FRAME gets called prior to children in that movieclip getting called...this is similar to onInit() in AS2. So for example you can have a button only on a particular frame and setup it's event listener to call your controller...in another swf, regardless of what the playhead is doing.

You should be aware if using that approach that when the framescript is called via the ENTER_FRAME, items in the frame may have not been added yet, so this approach can't be used to bind to objects on the timeline (e.g. to registerListeners to buttons), this the addFrameScript does not suffer from.