Показать сообщение отдельно
Старый 29.11.2009, 22:17
Dimax4d вне форума Посмотреть профиль Отправить личное сообщение для Dimax4d Найти все сообщения от Dimax4d
  № 2  
Ответить с цитированием
Dimax4d
 
Аватар для Dimax4d

Регистрация: Jul 2009
Адрес: Москва
Сообщений: 99
Можно с помощью событий.

Например:
Код AS3:
public class Main extends Sprite{
	private var childClass:ChildClass;
 
	public function Main() {
		this.childClass = new ChildClass();
		this.childClass.addEventListener("event_name", this.customEventHandler);
	}
 
	private function customEventHandler(event:CustomEvent):void {
		// Здесь делаем то, что нужно
	}
}
Код AS3:
public class ChildClass extends EventDispatcher{
 
	public function ChildClass() {
 
	}
	private function someFunction():void {
		// Делаем что-нибудь...
		super.dispatchEvent(new Event("event_name")); // Отсылаем событие	
	}
}