A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: ® - registered trademark in xml wont appear

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Posts
    8

    ® - 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

  2. #2
    Junior Member
    Join Date
    Oct 2007
    Posts
    8
    Any Ideas, I need to have this done, it is a minor but annoying part this project but it needs to be done.

    -Thanks

  3. #3
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    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>&#x101;</xhar>
            <xhar>&#x102;</xhar>
            <xhar>&#x103;</xhar>
            <xhar>&#x104;</xhar>
            <xhar>&#x105;</xhar>
            <xhar>&#x106;</xhar>
            <xhar>&#x107;</xhar>
            <xhar>&#x108;</xhar>
            <xhar>&#x109;</xhar>
            <xhar>&#x10A;</xhar>
            <xhar>&#x10B;</xhar>
            <xhar>&#x10C;</xhar>
            <xhar>&#x10D;</xhar>
            <xhar>&#x10E;</xhar>
            <xhar>&#x10F;</xhar>
            <xhar>&#x111;</xhar>
            <xhar>&#x112;</xhar>
            <xhar>&#x113;</xhar>
            <xhar>&#x114;</xhar>
            <xhar>&#x115;</xhar>
            <xhar>&#x116;</xhar>
            <xhar>&#x117;</xhar>
            <xhar>&#x118;</xhar>
            <xhar>&#x119;</xhar>
            <xhar>&#x11A;</xhar>
            <xhar>&#x11B;</xhar>
            <xhar>&#x11C;</xhar>
            <xhar>&#x11D;</xhar>
            <xhar>&#x11E;</xhar>
            <xhar>&#x11F;</xhar>        
        </charset>
        <charset type="Greek">
            <xhar>&#x391;</xhar>
            <xhar>&#x392;</xhar>
            <xhar>&#x393;</xhar>
            <xhar>&#x394;</xhar>
            <xhar>&#x395;</xhar>
            <xhar>&#x396;</xhar>
            <xhar>&#x397;</xhar>
            <xhar>&#x398;</xhar>
            <xhar>&#x399;</xhar>
            <xhar>&#x39A;</xhar>
            <xhar>&#x39B;</xhar>
            <xhar>&#x39C;</xhar>
            <xhar>&#x39D;</xhar>
            <xhar>&#x39E;</xhar>
            <xhar>&#x39F;</xhar>
            <xhar>&#x401;</xhar>
            <xhar>&#x402;</xhar>
            <xhar>&#x403;</xhar>
            <xhar>&#x404;</xhar>
            <xhar>&#x405;</xhar>
            <xhar>&#x406;</xhar>
            <xhar>&#x407;</xhar>
            <xhar>&#x408;</xhar>
            <xhar>&#x409;</xhar>
            <xhar>&#x40A;</xhar>
            <xhar>&#x40B;</xhar>
            <xhar>&#x40C;</xhar>
            <xhar>&#x40D;</xhar>
            <xhar>&#x40E;</xhar>
            <xhar>&#x40F;</xhar>    
            <xhar>&#x411;</xhar>
            <xhar>&#x412;</xhar>
            <xhar>&#x413;</xhar>
            <xhar>&#x414;</xhar>
            <xhar>&#x415;</xhar>
            <xhar>&#x416;</xhar>
            <xhar>&#x417;</xhar>
            <xhar>&#x418;</xhar>
            <xhar>&#x419;</xhar>
            <xhar>&#x41A;</xhar>
            <xhar>&#x41B;</xhar>
            <xhar>&#x41C;</xhar>
            <xhar>&#x41D;</xhar>
            <xhar>&#x41E;</xhar>
            <xhar>&#x41F;</xhar>        
        </charset>
        <charset type="Arabic">
            <xhar>&#x681;</xhar>
            <xhar>&#x685;</xhar>
            <xhar>&#x686;</xhar>
            <xhar>&#x687;</xhar>
            <xhar>&#x688;</xhar>
            <xhar>&#x689;</xhar>
            <xhar>&#x68A;</xhar>
            <xhar>&#x68B;</xhar>
            <xhar>&#x68C;</xhar>
            <xhar>&#x68D;</xhar>
            <xhar>&#x68E;</xhar>
            <xhar>&#x68F;</xhar>
            <xhar>&#x691;</xhar>
            <xhar>&#x692;</xhar>
            <xhar>&#x693;</xhar>
            <xhar>&#x694;</xhar>
            <xhar>&#x695;</xhar>
            <xhar>&#x696;</xhar>
            <xhar>&#x697;</xhar>
            <xhar>&#x698;</xhar>
            <xhar>&#x699;</xhar>
            <xhar>&#x69A;</xhar>
            <xhar>&#x69B;</xhar>
            <xhar>&#x69C;</xhar>
            <xhar>&#x69D;</xhar>
            <xhar>&#x69E;</xhar>
            <xhar>&#x69F;</xhar>        
        </charset>
        <charset type="Latin-1">
            <xhar>&#x0EA;</xhar>
            <xhar>&#x0E2;</xhar>
            <xhar>&#x0E3;</xhar>
            <xhar>&#x0E4;</xhar>
            <xhar>&#x0E5;</xhar>
            <xhar>&#x0E6;</xhar>
            <xhar>&#x0E7;</xhar>
            <xhar>&#x0E8;</xhar>
            <xhar>&#x0E9;</xhar>
            <xhar>&#x0EA;</xhar>
            <xhar>&#x0EB;</xhar>
            <xhar>&#x0EC;</xhar>
            <xhar>&#x0ED;</xhar>
            <xhar>&#x0EE;</xhar>
            <xhar>&#x0EF;</xhar>
            <xhar>&#x0A1;</xhar>
            <xhar>&#x0A2;</xhar>
            <xhar>&#x0A3;</xhar>
            <xhar>&#x0A4;</xhar>
            <xhar>&#x0A5;</xhar>
            <xhar>&#x0A6;</xhar>
            <xhar>&#x0A7;</xhar>
            <xhar>&#x0A8;</xhar>
            <xhar>&#x0A9;</xhar>
            <xhar>&#x0AA;</xhar>
            <xhar>&#x0AB;</xhar>
            <xhar>&#x0AC;</xhar>
            <xhar>&#x0AD;</xhar>
            <xhar>&#x0AE;</xhar>
        </charset>    
    </flash>

    */

  4. #4
    Junior Member
    Join Date
    Oct 2007
    Posts
    8
    Thanks I'll try it out

  5. #5
    Junior Member
    Join Date
    Oct 2007
    Posts
    8
    well it still didn't work, any other ideas. FYI, I am just using arial as the font

  6. #6
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    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

  7. #7

  8. #8
    Junior Member
    Join Date
    Oct 2007
    Posts
    8
    I tested it with a regular dynamic text field but it didn't show.

  9. #9
    Junior Member
    Join Date
    Oct 2007
    Posts
    8
    just realized that in your new post the Result has a html.text on it

  10. #10
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    first post uses a TextArea component (no html enabling needed)
    uploaded file uses a dynamic textfield ( to test Arial font )

  11. #11
    Junior Member
    Join Date
    Oct 2007
    Posts
    8
    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.

  12. #12
    Junior Member
    Join Date
    Oct 2007
    Posts
    1

    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.

  13. #13
    Junior Member
    Join Date
    Oct 2007
    Posts
    8
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center