Показать сообщение отдельно
Старый 02.06.2011, 22:18
Lyso вне форума Посмотреть профиль Отправить личное сообщение для Lyso Посетить домашнюю страницу Lyso Найти все сообщения от Lyso
  № 11  
Ответить с цитированием
Lyso

Регистрация: Sep 2010
Адрес: Красноярск
Сообщений: 217
Отправить сообщение для Lyso с помощью Skype™
Код AS3:
package{
	import flash.utils.Timer;
	import flash.events.TimerEvent;
	import flash.display.Sprite;
	import flash.events.Event;
 
	public class RandCircle extends Sprite{
		private var timer:Timer=new Timer(100);
		private var circle:Circle;
 
		public function RandCircle(){
			timer.addEventListener(TimerEvent.TIMER,onTimer);
			circle.addEventListener(circle.REMOVE_ME,onRemoveChild);
			timer.start();
		}
 
		private function onTimer(e:TimerEvent):void{
			circle=new Circle;
			addChild(circle);
			trace(this.numChildren);
		}
 
		private function onRemoveChild(e:Event):void{
			removeChild(Circle(e.target));
		}
 
 
	}
 
}