[COLOR=#333333]I keep getting this error… don’t know why as I’ve went over the code and no idea where I went wrong[/COLOR]
[COLOR=#333333]1120: Access of undefined property timerEvent.[/COLOR]
[COLOR=#333333]Here is the code I am doing: [/COLOR]
[COLOR=#333333]function onTick(event:TimerEvent):void [/COLOR]
[COLOR=#333333]{ [/COLOR]
[COLOR=#333333]if (circle2_mc.y > 0)[/COLOR]
[COLOR=#333333]myTimer.addEventListener(timerEvent.TIMER, timerListener);[/COLOR]
[COLOR=#333333]function timerListener (e:TimerEvent):void{[/COLOR]
[COLOR=#333333]trace(“Timer is set for 4 seconds because circle has moved!”);[/COLOR]
[COLOR=#333333]}[/COLOR]
[COLOR=#333333]myTimer.start();[/COLOR]
[COLOR=#333333]if (circle2.hitTestObject(hit) && potionInPlace == false ){[/COLOR]
[COLOR=#333333]potionInPlace = true;[/COLOR]
[COLOR=#333333]trace(“The circle is in place!”);[/COLOR]
[COLOR=#333333]myTimer.stop();[/COLOR]
[COLOR=#333333]//stop timer as object is in place[/COLOR]
[COLOR=#333333]mySound1.load(new URLRequest(“madhatter_pass.mp3”));[/COLOR]
[COLOR=#333333]mySound1.play();[/COLOR]
[COLOR=#333333]//play the audio[/COLOR]
[COLOR=#333333]}[/COLOR]
[COLOR=#333333]else{[/COLOR]
[COLOR=#333333]trace(“Didn’t Hit Target and Time is up”);[/COLOR]
[COLOR=#333333]mySound2.load(new URLRequest(“madhatter_fail.mp3”));[/COLOR]
[COLOR=#333333]mySound2.play();[/COLOR]
[COLOR=#333333]}[/COLOR]