| | |
Loading External Text in Flash Using AS3 URLLoader
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
hi
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
lydia
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
lydia
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,
Jas.
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,
Jas.
If you're into metal, check out my new band at:
http://www.myspace.com/kinasis
Now booking gigs for 2010....
http://www.myspace.com/kinasis
Now booking gigs for 2010....
Just found this little AS3 snippet:
at the following URL....
http://ricozuniga.com/2007/07/13/uni...ge-references/
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:
http://livedocs.adobe.com/flex/3/htm...=fonts_07.html
Cheers for now,
Jas.
ACTIONSCRIPT Syntax (Toggle Plain Text)
[Embed(source='assets/ttf/gothic.ttf', fontName='CenturyGothic', mimeType='application/x-font', unicodeRange="English")]
http://ricozuniga.com/2007/07/13/uni...ge-references/
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:
http://livedocs.adobe.com/flex/3/htm...=fonts_07.html
Cheers for now,
Jas.
If you're into metal, check out my new band at:
http://www.myspace.com/kinasis
Now booking gigs for 2010....
http://www.myspace.com/kinasis
Now booking gigs for 2010....
Please go through the files attached:
banco.fla:
Shows you how to embed and register the font with flash at runtime
fonttest.fla:
Shows how to utilize the embedded font into your textfield
Hope this helps!!!
banco.fla:
[Embed(systemFont="Banco Std", fontName="Banco", mimeType="application/x-font", unicodeRange="U+0041-U+005A")] var banco:Class; Font.registerFont(banco);
Shows you how to embed and register the font with flash at runtime
fonttest.fla:
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";
addChild(tf);
}Shows how to utilize the embedded font into your textfield
Hope this helps!!!
![]() |
Similar Threads
- Python and Flash AS3 (Python)
- Read contents of external text file into html page (HTML and CSS)
- Actionscript - load variable from external .txt (Graphics and Multimedia)
- read external text doc (Java)
- loading non delimited text file into access database using VB.net (Visual Basic 4 / 5 / 6)
- Loading a structure (text lines) from a file, modify the structure, then save (C)
- Flash AS3 bible (Graphics and Multimedia)
- Problem Loading Movieclips from library (Graphics and Multimedia)
- Loading External Website pages using ajax (JavaScript / DHTML / AJAX)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: Problem with flash!! help!
- Next Thread: Newbie needs help with Flash cs4
Views: 1489 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for Graphics and Multimedia
3d 10 actionscript3 adobe adobeacrobat adobereader air ajax amazon amf apple button cart childprotection cloud dashboard dell design dojofoundation dreamweaver ebay eclipse ecommerce elasticcomputecloud embed endorsement extra family flash flash-develop flashlite flex flv free harddrive iamthwee ibm illustrator imflash intel interactivemap intro javafx javascript laptop legal map micron microsoft mobile monitoringsoftware moonlight multimedia myspace nand news novell panorama pdf pedophiles photoshop photosynth php safety sandisk security shopping silverlight solidstatedrive sproutcore ssd streaming swf table ukmap unload unwanted video vulnerability web white.space xml zend zephyr zeroday





