Код AS3:
package mvc
{
import flash.text.TextField;
import flash.events.Event;
import flash.display.Stage;
public class View
{
private var numbSquare:Number;
private var _model:Model;
private var stage:Stage;
public function View()
{
if (stage)
{
init();
}
else
{
addEventListener(Event.ADDED_TO_STAGE, init);
}
}
function init(e:Event = null):void
{
trace("ss");
}
}
}
Выдает ошибку 1180: Call to a possibly undefined method addEventListener.
В чем может быть проблема?