Login / Sign Up

Your cart has 1 product totalling 36.00 USD

HTML in XML for Flash ActionScript 2

 

 

Here is the solution of inserting HTML formatted text into your Flash files through XML:

In your XML add your HTML data like this:

<htmlData><![CDATA[   Here is my <br/> html text   ]]></htmlData>



As a note, you can't insert your HTML data into an XML attribute.

In your Flash file do something similar to this:

xml = new XML();
xml.ignoreWhite = true;
xml.load("myXMLfile.xml");
xml.onLoad = function () {
    txt = createTextField("txt", 0, 0, 0, 0, 0);
    txt.html = true;
    txt.htmlText = xml.firstChild.nodeValue;
}

 


    
  • COMMENTS
Loading comments... If comments don't show up in 5 seconds, click to load

Leave a Reply

Only alphanumeric characters allowed
Please type a message!
Format your comments using Textile: *bold*, _italic_, "link text":address,
@code@