actionscript 3 - AS3 Error #1010 -
im taking as3 course , on 1 of lessons, on output of program: typeerror: error #1010: term undefined , has no properties. @ main()
this code:
package { import flash.display.movieclip; import flash.events.mouseevent; public class main extends movieclip { var startpage:startpage; var hillpage:hillpage; var lakepage:lakepage; public function main() { startpage = new startpage(); hillpage = new hillpage(); lakepage = new lakepage(); addchild(startpage); //add event listeners startpage.hillbutton.addeventlistener(mouseevent.click, onhillbuttonclick); startpage.pondbutton.addeventlistener(mouseevent.click, onlakebuttonclick); } //event handlers function onhillbuttonclick(event:mouseevent):void { addchild(hillpage); removechild(startpage); } function onlakebuttonclick(event:mouseevent):void { addchild(lakepage); removechild(startpage); } } }
if have please post it, driving me crazy.
oh , buttons on file wont work odd reason, same exact code lesson.
thank you
basically means trying access invalid parameter.
most either or both of startpage.hillbutton
& startpage.pondbutton
not exist. cant perform addeventlistener
on items.
Comments
Post a Comment