Please check my code for calling 8 functions sequentially with one button
does code calling functions func1 thru func8 every time next_btn clicked?
i following error: argument count mismatch on fwa_fla::maintimeline/nextreg(). expected 0, got 1.
my research tells me bad syntax. need "private" function? thanks much, i'm lost !!!
var counter:number = 0;
this.next1_btn.addeventlistener (mouseevent.click, nextfunc);
function nextfunc(event:mouseevent) : void
{
if (counter == 9) {
(counter == 0);
}
counter++;
trace(counter)
this["func"+counter]();
}
//reg1 thru reg8 defined below
function func1 (event:mouseevent) : void
{
do thing
}
function func1 (event:mouseevent) : void
{
do thing
}
// etc.
no code show not work. cannot have functions same name. also, errror indicating problem function named nextreg. not show function name. if programming in timeline not want use private/public/etc...
More discussions in ActionScript 3
adobe
Comments
Post a Comment