actionscript 3 - Getting a null object reference error for a button instance -
i trying use script jump point on timeline:
feature1_btn.addeventlistener(mouseevent.click, feature1); function feature1(event:mouseevent):void { gotoandplay(620); }
i have instance of button labeled "feature1_btn". why getting error?
you're getting error because you're attempting add listener instance before instance has been created and/or initialized. if code in timeline need make sure feature1_btn exists on stage @ point in timeline.
Comments
Post a Comment