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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -