PDA

View Full Version : [SOLVED] Scaleform HUD, dynamic text is replaced by squares



mktwo
07-04-2010, 10:47 AM
Hey people, so I just tried to make my HUD display my XP, Health and Level-number, all works fine, except for the fact that where there should be a number telling me what my level is, there is a little square.

I have my font set to "export for ActionScript", so I don't what else causes this...

Hope you can help me out!

P.S.: I built my HUD on Grosie's tutorial, and when I tested just the Health-bar and percentage, it worked fine, no squares or anything.

I also tried putting the textfield in a movieclip that was set to export for ActionScript, but that didn't work...

eAlex79
07-04-2010, 10:53 AM
Embed your Font into the SWF.

mktwo
07-04-2010, 11:16 AM
Would you mind telling me how exactly? Because I think I already have, but just to make sure, you know..

eAlex79
07-04-2010, 11:41 AM
Go to your text element in flash and click "Character Embeding"....

There is a font lib thing too, for that I don't know how that works (in Gfx).

mktwo
07-04-2010, 11:59 AM
I searched for "Character Embedding", but the closest I could find was "Font Embedding", so I think you meant that, but in Font Embedding Options I checked "Export for ActionScript" and "Export in frame 1", I also checked "All" in the Character Ranges, but it still doesn't work...

Could it be a scripting problem? This particular bit is for telling what number to display:

LevelTF.SetString("text", ""$CurrentLevel);

I am not sure if that's the right way to do it, though, maybe there is something wrong with that?

eAlex79
07-04-2010, 12:02 PM
No, select your Text object in Flash, go to properties and click Character Embedding, there you can choose which ranges are embedded, that way will function. That docs what you found puts the font to the file's library and I don't know how that works with Gfx.

mktwo
07-04-2010, 12:15 PM
I can only find "Embed..." under the Character submenu, but that just takes me to "Font Embedding", where I already checked all the necessary checkboxes..

I'm using Flash CS5, btw.

Here's some screenshots:
http://img205.imageshack.us/img205/9284/fontembedding1.jpg
http://img695.imageshack.us/img695/9204/fontembedding2.jpg
http://img180.imageshack.us/img180/8503/fontembedding3.jpg

eAlex79
07-04-2010, 12:49 PM
I use CS4 and I get this one, and I know for sure that works.

http://picasaweb.google.de/lh/photo/CYkRy-AHZj_4J213GL31qA?feat=directlink

Seems in CS5 it wants to put the font into the library. Sorry I just don't know how that works.

mktwo
07-04-2010, 12:52 PM
Alright, well, thanks for trying anyway!

Edit: So I just tried, out of desperation, to not just check "All" in the character ranges, but also add numerals, lower- and uppercase, and for some strange reason it works now...

I swear, I'm about to lose my mind :'D

eAlex79
07-04-2010, 01:07 PM
;) There you go :p

DragonSpawn
08-12-2010, 06:39 AM
Alright, well, thanks for trying anyway!

Edit: So I just tried, out of desperation, to not just check "All" in the character ranges, but also add numerals, lower- and uppercase, and for some strange reason it works now...

I swear, I'm about to lose my mind :'D

A proper solution for this would be nice at some point. That sadly didn't solve it for me.

Edit:
Actually it did work. I forgot to reimport the swf after saving it. Am used to Unity 3D re-importing assets automatically :P