I have this base class
package sevengames.miranda.front.res {
import flash.display.MovieClip;
import flash.text.TextField;
public class MenuButtonBase extends MovieClip {
protected var text:TextField;
protected var bt:String = null;
public function MenuButtonBase() {
stop();
buttonMode = true;
mouseChildren = false;
}
protected function updateText():void {
if (text != null) {
text.text = bt == null ? "???" : bt;
}
}
public function set buttonText(t:String):void {
bt = t;
text.text = bt;
}
}
}
I then, in the Flash document, create a movie clip which has this class set as the "Base class" in the properties. However, if I then do this.updateText();
in the movie clip's frame script, it complains
TypeError: Error #1006: updateText is not a function.
at miranda_fla::MenuButton_3/frame1()
Why doesn't it work? I know the class is read and compiled, because I had an error there which was reported.