-
® - registered trademark in xml wont appear
I am trying to grab some text from a XML file and display it in a dynamic text box in flash, but it wont appear, I can get the TM but cant get the ® to display.
Any ideas
-thanks
-
Any Ideas, I need to have this done, it is a minor but annoying part this project but it needs to be done.
-Thanks
-
FK'n_dog
set UTF-8 encoding in your xml declaration and save in Notepad as UTF-8 format
tested with -
PHP Code:
//-- on stage - TextArea component -- instance name - Result
var _xml:XML = new XML();
_xml.ignoreWhite = true;
_xml.load('charset.xml');
_xml.onLoad = function(){
aNode = this.firstChild.childNodes;
for(var a=0; a<aNode.length; a++){
Type = aNode[a].attributes.type;
Result.text += "<b><font size='24'>" + Type + "</font></b><br>";
var chars:Array = new Array();
for(var b=0; b<aNode[a].childNodes.length; b++){
chars.push(aNode[a].childNodes[b].firstChild.nodeValue);
}
Result.text += "<font size='20'>" + chars.join(", ") + "</font><br><br>";
}
};
/*--charset.xml--
<?xml version="1.0" encoding="UTF-8"?>
<flash>
<charset type="Latin-A Extended">
<xhar>ā</xhar>
<xhar>Ă</xhar>
<xhar>ă</xhar>
<xhar>Ą</xhar>
<xhar>ą</xhar>
<xhar>Ć</xhar>
<xhar>ć</xhar>
<xhar>Ĉ</xhar>
<xhar>ĉ</xhar>
<xhar>Ċ</xhar>
<xhar>ċ</xhar>
<xhar>Č</xhar>
<xhar>č</xhar>
<xhar>Ď</xhar>
<xhar>ď</xhar>
<xhar>đ</xhar>
<xhar>Ē</xhar>
<xhar>ē</xhar>
<xhar>Ĕ</xhar>
<xhar>ĕ</xhar>
<xhar>Ė</xhar>
<xhar>ė</xhar>
<xhar>Ę</xhar>
<xhar>ę</xhar>
<xhar>Ě</xhar>
<xhar>ě</xhar>
<xhar>Ĝ</xhar>
<xhar>ĝ</xhar>
<xhar>Ğ</xhar>
<xhar>ğ</xhar>
</charset>
<charset type="Greek">
<xhar>Α</xhar>
<xhar>Β</xhar>
<xhar>Γ</xhar>
<xhar>Δ</xhar>
<xhar>Ε</xhar>
<xhar>Ζ</xhar>
<xhar>Η</xhar>
<xhar>Θ</xhar>
<xhar>Ι</xhar>
<xhar>Κ</xhar>
<xhar>Λ</xhar>
<xhar>Μ</xhar>
<xhar>Ν</xhar>
<xhar>Ξ</xhar>
<xhar>Ο</xhar>
<xhar>Ё</xhar>
<xhar>Ђ</xhar>
<xhar>Ѓ</xhar>
<xhar>Є</xhar>
<xhar>Ѕ</xhar>
<xhar>І</xhar>
<xhar>Ї</xhar>
<xhar>Ј</xhar>
<xhar>Љ</xhar>
<xhar>Њ</xhar>
<xhar>Ћ</xhar>
<xhar>Ќ</xhar>
<xhar>Ѝ</xhar>
<xhar>Ў</xhar>
<xhar>Џ</xhar>
<xhar>Б</xhar>
<xhar>В</xhar>
<xhar>Г</xhar>
<xhar>Д</xhar>
<xhar>Е</xhar>
<xhar>Ж</xhar>
<xhar>З</xhar>
<xhar>И</xhar>
<xhar>Й</xhar>
<xhar>К</xhar>
<xhar>Л</xhar>
<xhar>М</xhar>
<xhar>Н</xhar>
<xhar>О</xhar>
<xhar>П</xhar>
</charset>
<charset type="Arabic">
<xhar>ځ</xhar>
<xhar>څ</xhar>
<xhar>چ</xhar>
<xhar>ڇ</xhar>
<xhar>ڈ</xhar>
<xhar>ډ</xhar>
<xhar>ڊ</xhar>
<xhar>ڋ</xhar>
<xhar>ڌ</xhar>
<xhar>ڍ</xhar>
<xhar>ڎ</xhar>
<xhar>ڏ</xhar>
<xhar>ڑ</xhar>
<xhar>ڒ</xhar>
<xhar>ړ</xhar>
<xhar>ڔ</xhar>
<xhar>ڕ</xhar>
<xhar>ږ</xhar>
<xhar>ڗ</xhar>
<xhar>ژ</xhar>
<xhar>ڙ</xhar>
<xhar>ښ</xhar>
<xhar>ڛ</xhar>
<xhar>ڜ</xhar>
<xhar>ڝ</xhar>
<xhar>ڞ</xhar>
<xhar>ڟ</xhar>
</charset>
<charset type="Latin-1">
<xhar>ê</xhar>
<xhar>â</xhar>
<xhar>ã</xhar>
<xhar>ä</xhar>
<xhar>å</xhar>
<xhar>æ</xhar>
<xhar>ç</xhar>
<xhar>è</xhar>
<xhar>é</xhar>
<xhar>ê</xhar>
<xhar>ë</xhar>
<xhar>ì</xhar>
<xhar>í</xhar>
<xhar>î</xhar>
<xhar>ï</xhar>
<xhar>¡</xhar>
<xhar>¢</xhar>
<xhar>£</xhar>
<xhar>¤</xhar>
<xhar>¥</xhar>
<xhar>¦</xhar>
<xhar>§</xhar>
<xhar>¨</xhar>
<xhar>©</xhar>
<xhar>ª</xhar>
<xhar>«</xhar>
<xhar>¬</xhar>
<xhar>­</xhar>
<xhar>®</xhar>
</charset>
</flash>
*/
-
-
well it still didn't work, any other ideas. FYI, I am just using arial as the font
-
FK'n_dog
did you test my code above ?
did the character display OK ?
total guesswork this end as you show
no code, no xml, no uploaded files to test
-
FK'n_dog
-
I tested it with a regular dynamic text field but it didn't show.
-
just realized that in your new post the Result has a html.text on it
-
FK'n_dog
first post uses a TextArea component (no html enabling needed)
uploaded file uses a dynamic textfield ( to test Arial font )
-
ok I tested it, it only displays the title but none of the symbols. I going to post some code in a bit, just have to finish something first.
-
no circle R in dynamic text box
after some serious pain over the same problem, this is what i figured out.
you need to paste the ® symbol into the dynamic text field embed 'include these characters' box.
and use the ® entity in your xml.
the trademark tm and other entities are included by default, but i guess they missed one. namely the circle r. and of course flash fails without telling you anything.
i have the xml wrapped in cdata tags since i'm passing some javascript in as well. if you're just passing it in without that, modified dog's version works fine.
although i didn't test his on dynamic text field instead of a textArea component.
-
I kinda gave up on this issue and just decided to use it like this (R). But this sounds like it will work, I kinda thought it had something to do with embedding but I had to finish that project for a dead line and decided not bothering figuring it out anymore. But I will try it out and keep it in mind for future projects and tell you how it goes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|