На АС2 не писал уже давно. Не понимаю как сделать, чтобы мувик генерил события
На код:

Код:
import mx.utils.Delegate;
import AsBroadcaster;
class Slot extends MovieClip {
private var intervalId:Number;
private var currentCount:Number;
public function Slot() {
AsBroadcaster.initialize(this);
this.currentCount = 1;
this.rotateSlot();
}
public function rotateSlot():Void {
this.intervalId = setInterval(Delegate.create(this,myTimer), 25);
}
private function myTimer():Void {
this.currentCount++;
if (this.currentCount % 30 == 0) {
clearInterval(this.intervalId);
trace(this);
this.broadcastMessage("onStopRotating");
}
updateAfterEvent();
}
}
Выдает ошибку:
Цитата:
|
There is no method with the name "broadcastMessage";
|