I would like an ActionScript 2.0 class written with a static function.
The function will receive flash html text and output XHTML which exactly matches the formatting in Flash. Currently I am using a slightly modified PHP script from [url removed, login to view] that does a mostly decent job with this task. You can probably get much of the code logic from there. The main problems with the PHP code are when it is dealing with bulletted items and indents of bulleted items, although there are some other inconsistencies as well.
The XHTML code needs to render exactly the same on IE, Firefox, and other browsers. If this is not possible I need to know how close we can get... or how much better it can be than what I am using now.
I've attached 5 files.
Screen shot of text in Flash
Screen shot of output XHTML rendered in IE
Screen shot of output XHTML rendered in Firefox 1.5
Text file containing the flash html.
Text file containing the output XHTML.
You can use an online flash text editor in the link above to get as much Flash HTML as you want for testing. Ideally I would like support for line spacing and letter spacing in addition to the basic formatting.
Again let me know what is possible. If I can't get much better than what the PHP script is doing then its probably not worth doing.