I am doing a flash website in danish language.i am using loading external text method.I am not getting special chatacters which are used in the language (ex: æ,å, ø).please tell me how to display in flash swf.i have tried this with url encoder but some characters are working.others are coming like boxes.please do reply me.
thanks.its urgent please help me

Recommended Answers

All 4 Replies

Member Avatar for rajarajan2017

Do you give the font that you used for the danish language? Let I will try...

I remember having similar problems using flash 8 several years ago.. Certain extended ascii characters wouldn't show up in dynamically loaded text.

The solution was to select the dynamic textbox that the text was loaded into, open the properties panel and click on the 'Embed..' button. This allows you to select which characters from the font are embedded into your movie. I think by default it only includes the 'Basic Latin' character set (95 characters) in the English version of flash...not sure about flash in other languages!

I assume that you'll be needing to use either 'Latin I' or one of the 'Latin Extended' character sets.

Anyway, as long as your font contains all of the relevant characters and the character embedding settings are set appropriately your text should appear correctly.

Obviously, that was in the Flash 8 IDE. I'm not sure if this still applies to the CS3/CS4 IDE's, but it couldn't hurt to check.
There should also be a way of setting this via actionscript, but if there is, offhand I can't think of it!

The reason for the Character Embedding setting is to keep your .swfs filesize down.

For example:
Imagine you have a font which contains all possible 39,477 glyphs (which would be one massive .ttf file!) and you're using it in a text box to display some text.

If you export your movie with the default settings (Basic Latin - 95 chars - A..Z,a..z, 0..9 and basic punctuation) then any extended characters/glyphs (i.e. the other 39382 in the font) will not be included and therefore will not be shown if they appear in the text in the textbox.

So if you need to display additional characters, you need to select a different character set to embed. (you can also specify additional individual glyphs if need be!)

Whereas if you were only using the numerical digits 0..9 in your text-box, you could set the embed settings to 'Numerals' so the only characters from the font to be embedded in your .swf would be the characters 0..9.

That way only 10 glyphs out of the 39,477 in the font would be included in your .swf instead of the default 95 of 39,477.
Meaning that you've got 85 less glyphs in your movie and thus you save some space in your swf.

You've got the former problem, you need to alter your Embed settings to include more characters. Your movie will be a little bigger in size, but you'll be able to see all of the characters.

Like I said, I'm not sure if it's still possible to do the above in CS3/CS4, but it might be worth a look!
Cheers for now,

Just found this little AS3 snippet:

[Embed(source='assets/ttf/gothic.ttf', fontName='CenturyGothic', mimeType='application/x-font', unicodeRange="English")]

at the following URL....

Might be worth a try, if you're embedding the font in code, then setting the unicode range as above might help. (you'd just need to find out what the Danish unicode range is! ;) )

Also take a look at the following:

Cheers for now,

Member Avatar for rajarajan2017

Please go through the files attached:


[Embed(systemFont="Banco Std", fontName="Banco",
	   mimeType="application/x-font", unicodeRange="U+0041-U+005A")]
var banco:Class;


Shows you how to embed and register the font with flash at runtime


var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, fontLoaded);
loader.load(new URLRequest("banco.swf"));

function fontLoaded(e:Event):void
	var tf:TextField = new TextField();
	tf.width = 600;
	tf.embedFonts = true;
	tf.defaultTextFormat = new TextFormat("Banco", 60, 0x000000);
	tf.text = "RUNTIME FONTS";

Shows how to utilize the embedded font into your textfield

Hope this helps!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.