Have a look at this:
http://www.smithmediafusion.com/blog/?p=144 --
Dan Mode
--> Adobe Community Expert
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11 *THE online Radio*
http://www.tornadostream.com *Must Read*
http://www.smithmediafusion.com/blog [quoted text, click to view] "maija_g" <webforumsuser@macromedia.com> wrote in message
news:ectaov$gv8$1@forums.macromedia.com...
>I have a static, UTF-8 encoded XML document that gets loaded by a custom
>movie
> clip class into an array and then items from the array are read and
> displayed
> in a dynamic text field that is attached to the movie clip, depending on
> which
> one is rolled over. Everything works perfectly except that an ampersand
> displays as & apostrophes display as ' and quotes display as ',
> even
> if I use the special character inside the XML. Higher level character
> codes
> actually display properly, so character codes for circle shaped bullets,
> registered trade mark symbol, Greek characters, etc, work! But a blessed
> ampersand does not.
>
> Setting the dynamic text field to either read as HTML or not read as HTML
> makes no difference.
>
> Using CDATA tags in the XML makes no difference. In fact, when I use CDATA
> tags and enclose text containing a special character code, Flash goes the
> extra
> step of converting the ampersand in the special character code to &!!
> So '
> becomes &quot;.
>
> Using & just gets converted to &. So Flash is parsing the & to
> an
> ampersand, which it then converts to &. WHY? And how do I stop it?
>
> I found the function below to clean out the unwanted characters, and it
> works,
> but it seems a ridulous length to go to. And I probably have to extend it
> to
> accomodate whatever other characters don't work in Flash, but I don't know
> what
> those might be until I encounter them. And the whole point to using the
> XML was
> so that someone without Flash could update the file.
>
> Thanks for any help.
>
> private function cleanTextFunc(txt):String {
> txt = txt.toString();
> txt = txt.split("'").join("'");
> txt = txt.split("&").join("&");
> txt = txt.split(""").join("\"");
> return txt;
> }
>