R – Flash AS3 Game – high score with graphics not with text

actionscript-3flash

is it possible to use graphics (the numbers 0-9 in one png-file) instead of a Textfield to show the high score of a game to the player?
With a TextField it is easy to "refresh" the score but what can I do, if I want to use my png-files for the score? Is there a simple way to do this? How are other flash game designer do it?

My current solution (not tested, just in my head) is, to create 10 bitmaps (numbers from 0-9) or 1 bitmap with all the numbers in it and then convert the current score into a string, split this string and for every digit show the matching bitmap.

Update: or should i try to use filters on the textfield to create a "more beautiful" score?

Best Answer

If the digits you want to display exist in some form as a font, then you should almost certainly show them in a text field set to that font - make sure to embed the font in question! The important thing is that there's no reason to use images if the images are coming from a font - just let Flash display the font information.

If however the digits you want to use began life in some other way - if they're hand-drawn, or the come from photos, etc., then the solution you're describing sounds like the right way to go.

Related Topic