Alan
Alan

Reputation: 5189

How to get the text of a button in actionscript 2?

I tried trace(playBtn.text); but only got a undefined,anyone knows?

Upvotes: 0

Views: 832

Answers (1)

DaiYoukai
DaiYoukai

Reputation: 1898

Edit: Sorry, it's been a while since I've used AS2.

Turns out when it comes to SimpleButton you can't access dynamic text or other objects that are located within them.

You could always create a movieClip and have it have two layers, one that contains the SimpleButton and one that contains a Dynamic Text field that you can modify.

Upvotes: 0

Related Questions