--------------------------------------------------------------------------------------------
STEPS:
0) MAKE BUTTON WITH INSTANCE NAME = Btn1
1) MAKE TWO DYNAMIC TEXT BOXES WITH INSTANCE NAME =
Txt1 , Txt2
2) PASTE CODE IN LAYER NO: 1 FRAME NO:1
--------------------------------------------------------------------------------------------
CODE:
--------------------------------------------------------------------------------------------
//FRAME NO:1 CODE AS3
var ScoreCount:Number = 0;
var LevelCount:Number = 0;
Txt1.text =
" SCORE:"+ScoreCount.toString();
Txt2.text =
" LEVEL:"+LevelCount.toString();
Btn1.addEventListener(MouseEvent.CLICK,AddOne);
function AddOne(e:MouseEvent):void{
ScoreCount = ScoreCount
+ 1;
LevelCount = ScoreCount
/10;
Txt1.text =
" SCORE:"+ScoreCount.toString();
if(ScoreCount >9){
Txt2.text =
" LEVEL:"+LevelCount.toString();
LevelCount++ ;
}
}
--------------------------------------------------------------------------------------------
EmoticonEmoticon