мне нужно чтоб текст (nam) исчезал через каждые 0,01 секунды я набросал вот такой код:

Код AS3:
package p {
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.events.*;
import flash.text.*;
import flash.display.Sprite;
import flash.display.DisplayObjectContainer;
public class DrawName extends MovieClip {
private var nam;
private var cont:Sprite = new Sprite();
private var timer;
public function DrawName() {
}
public function drawNam(){
trace('Класс, анимирующий название модуля');
this.nam = new CreateButton('Кожа', 30, 0xff0000, "Times New Roman", true, false, 90, 60,
100, 100, TextFieldAutoSize.CENTER,
TextFormatAlign.CENTER, false, null, false, null,
false, null);
this.cont.addChild(nam);
this.cont.alpha = 1;
addChild(cont);
this.timer = new Timer(100, 0);
this.timer.addEventListener(TimerEvent.TIMER, timerListener);
this.timer.start();
}
private function timerListener(e:TimerEvent) {
trace(this.cont.alpha);
this.cont.alpha -= 0.01;
addChild(cont);
}
}
}
Добавлено через 49 секунд
я с таймером еще не встречался поэтому сразу извините если где-то что-то глупо