Probably another easy one, but after hours of searching and trying I still cant get this working.
I have a keypad with 10 buttons (0 - 9) - I want to create a variable that stores the number of key presses on the keypad and displays each MC accordingly in sequence depending on how many presses have been made.
For example, if only 1 key has been pressed, then only the first MC displays (and increments the variable to '1'), if 2 keys have been pressed then the first and second MC's are displayed - and so on until all 4 of my MC's are displayed and the MC progresses to frame #33.
I am getting different errors depending on how I structure this (mainly "expecting identifier before greaterthan")
My code for button '0' is below, can anyone assist please?
kpad.b0.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown0);
var clickCount:int = 0;
function onMouseDown0(e:MouseEvent):int {
clickCount++();
if (clickCount <= 0)
as1.visible = true;
if (clickCount == 1)
as1.visible = true;
if (clickCount == 2)
as1.visible = true;
as2.visible = true;
if (clickCount == 3)
as1.visible = true;
as2.visible = true;
as3.visible = true;
if (clickCount == 4)
as1.visible = true;
as2.visible = true;
as3.visible = true;
as4.visible = true;
if (clickCount => 4)
this.gotoAndPlay (33)
}