Dynamic Text Boxes disappearing in AS3

120 views Asked by At

I've got a small interactive flash animation, there's a button that allows the user to gain points then clicked, then another to go to a "Shop" when clicked. the only problem is that the Dynamic text box doesn't show the value on the second frame. All the actionscript is on one Layer, throughout the entire file.

var money = 100;
var shopbtn;
cash_txt.text = money;

stop();

Button.addEventListener(MouseEvent.CLICK, MoneyGet);
function MoneyGet (evt: MouseEvent){
money += 50;
cash_txt.text = money;
}

shopbtn.addEventListener(MouseEvent.CLICK, Shop);
function Shop (evt: MouseEvent){
cash_txt.text = money;
gotoAndStop(2);
}

I've checked if embedded fonts is working, and it's fine. Thanks. I'm using Professional CC.

0

There are 0 answers