0 Replies Latest reply on Jul 9, 2006 9:13 AM by stephan.k

    html text verus straight text output in flash

    stephan.k Level 1
      Hi Forum

      I am building a backend / admin page for a website which allows the owner to replace certain text areas on the site with html text. I'm storing the data in a mySQL database and retrieve it and save it with two php scripts. Everything is working smoothly. The only thing I'm having trouble with is the formatting and how to correctly display the html (the source) text in flash. I'm getting the data in via xml. (is there a way to get it in as normal text using the sendAndLoad command? I tried loadVars as the receiver but no success.. ?)

      The two most important lines of code are:
      if(getViewMode()=="html"){
      output.htmlText = xml.firstChild.childNodes
      }else{
      output.text = xml.firstChild.childNodes
      }
      }


      1. The regular text mode works fine. The output looks like this:

      LINKS
      ,,
      ,,
      ,,
      ,,,GOOGLE.COM

      (not sure what the commas are about? They seem invisible though when flash looks at them. They only come up when I paste them in here)


      2. The HTML text looks something like this:

      <TEXTFORMAT LEADING="1"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="15" COLOR="#7B9ABE" LETTERSPACING="0" KERNING="0">LINKS</FONT></P></TEXTFORMAT>,<TEXTFORMAT LEADING="1"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="15" COLOR="#7B9ABE" LETTERSPACING="0" KERNING="0">,</FONT></P></TEXTFORMAT>,<TEXTFORMAT LEADING="1"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="15" COLOR="#7B9ABE" LETTERSPACING="0" KERNING="0">,</FONT></P></TEXTFORMAT>,<TEXTFORMAT LEADING="1"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="15" COLOR="#7B9ABE" LETTERSPACING="0" KERNING="0">,</FONT></P></TEXTFORMAT>,<TEXTFORMAT LEADING="1"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="15" COLOR="#7B9ABE" LETTERSPACING="0" KERNING="0">,,<A HREF=" HTTP://WWW.GOOGLE.COM" TARGET="">GOOGLE.COM</A></FONT></P></TEXTFORMAT



      What do I need to change?
      Any ideas?

      Thanks for any leads.

      Best

      Stephan