Copy link to clipboard
Copied
I have a very Stupid Question,
how can i get 2 digit number
here is my code-
stop();
var total:int = 00;
totaltext.text = total.toString();
opt01.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{
total = total +10;
totaltext.text=total.toString();
opt01.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
}
opt0203.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
function fl_MouseClickHandler_2(event:MouseEvent):void
{
total = total +10;
totaltext.text=total.toString();
opt0203.removeEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
}
next.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3);
function fl_MouseClickHandler_3(event:MouseEvent):void
{
if(total == 20)
{
gotoAndStop(2);
}
else
{
trace("RETRY")
}
}
If it's only displaying one character no matter what you set it to, that's because you made your text field too small.
Copy link to clipboard
Copied
right now im getting only single digit number
Copy link to clipboard
Copied
in total im only getting 1 instead of 10
Copy link to clipboard
Copied
Hi.
I didn't quite understand what you want to do. Can you elaborate more or give an example?
Regards,
JC
Copy link to clipboard
Copied
If it's only displaying one character no matter what you set it to, that's because you made your text field too small.
Copy link to clipboard
Copied
ohh god thank you so much....