1

I wrote a flash game a while back (CS3) and it used to work but when trying to compile the same FLA file in CS5 does not work.

I've got a dynamic text field called tScore

 tScore.text = Score; 

Used to apply the current integer value of the user's score to the text box. It no longer does that. (It appear empty)

By way of simple debugging:

 tScore.text = Score.toString; // no value shown
 tScore.text = String(Score); // no value shown
 tScore.text = "A"; // sets the field to the value A
 tScore.text = "123"; // no value shown
 tScore.text = "C123"; // value "C" shown
 tScore.text = "A12A"; // value "AA" shown
 tScore.text = "000"; // value "000" shown
 tScore.text = "01"; // value "0" shown

I know it's been a long time for weird stuff to happen in flash - but - this makes no sense to me.

Has anyone experienced a text field that doesn't accept digits?

Alex C
  • 16,624
  • 18
  • 66
  • 98

3 Answers3

6

Sounds like it could be a font embedding issue, it has changed somewhat between CS3 and CS5. So you could go into the "Font Embeding" panel and make sure "Numerals" are included for the font used.

Lars Blåsjö
  • 6,118
  • 2
  • 19
  • 23
  • Pretty sure this is the correct answer. CS5 embedding takes a little getting used to. – Zevan Dec 13 '10 at 21:20
  • It is indeed the correct answer. I created a frame offstage with the numbers 0123456789 on it and all scores showed up correctly. – Alex C Dec 13 '10 at 23:32
1

I solved the issue changing the property Anti-alias of the dynamic text to Use device fonts (instead of default "Anti-alias for readability").

Sure, the text looks ugly but it's acceptable in my case.

Ena
  • 3,481
  • 36
  • 34
0

I haven't experienced anything like that before. I suggest you use traces to determine whether the textbox even exists and whether it holds anything at all.

Also check if the properties of the textbox are still valid (maybe CS5 weirded it up and make it static or input for all you know)

Pimgd
  • 5,983
  • 1
  • 30
  • 45
  • Well it definitely exists because I can set it's value to display shorts strings of letters like "ABC" or "000" however most digits to not appear in the box ... Also tried deleting and re-adding the textbox but it's showing the same behavior. – Alex C Dec 13 '10 at 20:25
  • When you set it a number, and trace the .text attribute, do you get the output you expect to get (the number you put in)? – Pimgd Dec 13 '10 at 20:36