Hi guys im completely new to this so go easy
Basically i'm trying to get this function to add one to a variable and then when the variable hits a certian number I want it to go to a different page. Heres the code ive come up with
var Hit:Number=0;
Cymbol2.addEventListener(MouseEvent.CLICK, DrumBeat);
Kick2.addEventListener(MouseEvent.CLICK, DrumBeat);
function Drumbeat (event:MouseEvent) :void {Hit=+1}
function checkPage(e:Event):void {
if (Hit==3) {
gotoAndPlay("Bedroom1");
}
}
Any help would be greatly appreciated
