How do I fix this Error #1010: : A term is undefined and has no properties. at Main/showIntro() at Main(). The code that I used is from a online tutorial.
package {
import flash.events.MouseEvent;
import flash.events.Event;
import flash.display.MovieClip;
public class Main extends MovieClip {
private var intro:Introduction;
public function Main() {
intro = new Introduction();
showIntro();
}
private function showIntro():void {
//add intro
addChild(intro);
//add eventlistener
intro.begin_btn.addEventListener(MouseEvent.CLICK, clickBegin);
intro.x = stage.stageWidth/2;
intro.y = stage.stageHeight/2;
}
private function clickBegin(e:MouseEvent):void {
trace("0");
}
}
}
}
intro.begin_btn
actually exist? – h2oooooooIntrodction
? Did you include the Class somewhere? – putvandeIntroduction
class correctly. Check if the "begin" button is namedbegin_btn
, if not, correct that. – Vesper