Hi Andrew,

I took a look at what we did and, unfortunately, our solution was a
"pre-processing" script before the HTML was deployed to our Flash project.
Since there are "real" differences between Flash HTML and standard HTML --
especially with regards to white space -- we provided our client a set of
guidelines so that they could use any WYSIWYG HTML editor. We then parsed
the files subbing out character entities for Flash Unicode notation
(\u0000), collapsing whitespace, etc.

Sorry I did not get back to you yesterday. 

...Rob

P.S. FWIW, using split/join, is probably the easiest way to do it.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
Sinning
Sent: Sunday, January 13, 2008 10:23 PM
To: Flash Coders List
Subject: Re: [Flashcoders] mdash in htmlText

Thanks Helmut.  With your lead I was able to come up with the following.
(There's probably a better way to do a replaceAll, but using slit.join is
least amount of code that I know of.)

function htmlAmpCharsToFlashHtmlAmpChars(str:String):String {

    str = str.split(" ").join(" ");

    str = str.split(" ").join(" ");

    str = str.split("–").join("–");

    str = str.split("—").join("—");

    str = str.split("—").join("—");

    str = str.split("‘").join("‘");

    str = str.split("’").join("’");

    str = str.split("“").join("“");

    str = str.split("⁄").join("⁄");

    str = str.split("€").join("€");

    str = str.split("™").join("™");

    str = str.split("←").join("←");

    str = str.split("→").join("→");

    str = str.split("←").join("←");

    str = str.split("→").join("→");

    str = str.split("↔").join("↔");

    str = str.split("⇐").join("⇐");

    str = str.split("⇒").join("⇒");

    return str;

}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to