How to count to 8 and then start over
my problem can't seem reset countreg var 0 once hits 8. ideas?
var countreg:number = 0;
function nextreg(event:mouseevent) : void
{
if (countreg == 9)
{
(countreg == 0);
}
countreg++;
trace (countreg) // keeps counting up. won't start on after 8
}
this.next1_btn.addeventlistener (mouseevent.click, nextreg);
thanks much
function nextreg(event:mouseevent) : void
{
countreg=(countreg+1)%9
}
More discussions in ActionScript 3
adobe
Comments
Post a Comment