Hi I'm loading data from an XML file with html specific tags so I can put
all the formatting of the text field in the XML file, my XML looks something
like this:
<?xml version="1.0" encoding="utf-8"?>
<screen>
<text>
<english>
<p>96% of CEOs believe reputation is important to their
companies as ultimately it increases sales.</p>
<p> </p>
<p>. corporate identity concept development</p>
<p>. name creation and analysis</p>
<p>. logo design</p>
<p>. slogan and mission statement development</p>
<p>. corporate identity manuals</p>
<p>. focus groups </p>
<p>. advertising (TV, print, radio and online)</p>
<p>. creative development</p>
<p>. creative copywriting</p>
<p>. media planning</p>
</english>
</text>
</screen>
flash read it ok and I'm assigning this text to a textField using:
myTextFiled_txt.htmlText = myNode
the funny thing is whenever a new <p> is created in the text field a ","
appears so the text would look like:
,96% of CEOs believe reputation is important to their companies as
ultimately it increases sales.
,
,. corporate identity concept development
,. name creation and analysis
,. logo design
,. slogan and mission statement development
,. corporate identity manuals
,. focus groups
,. advertising (TV, print, radio and online)
,. creative development
,. creative copywriting
,. media planning
Has anybody been in a situation like that?
thanx
German
maija_g - 30 Aug 2006 16:41 GMT
Is myNode a .firstChild or firstChild.nodeValue? It should be firstChild.nodeValue so that your loading a string into the text field and not a piece of XML.
German Hernandez - 30 Aug 2006 21:44 GMT
well I've done that... was really weird.. I even converted to string the
node value. What I had to do was really stupid. after assigning the text to
the textField, I created a new variable where the content of the textfield
would be stored, then replace ">," for ">" because the "," would be always
after a tag, and then assign the textFiled.htmltext property again.
german
.firstChild or firstChild.nodeValue? It should be firstChild.nodeValue so
that your loading a string into the text field and not a piece of XML.
Motion Maker - 31 Aug 2006 11:56 GMT
You might want to send your XML using a CDATA node.
<![CDATA[<p align='center'><b>Hello</b></p> ]]>
Also look at XML.ignoreWhite
http://livedocs.macromedia.com/flash/8/main/00002871.html

Signature
Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples:
http://flashexamples.hosfordusa.com
May many happy bits flow your way!
> Hi I'm loading data from an XML file with html specific tags so I can put
> all the formatting of the text field in the XML file, my XML looks
[quoted text clipped - 45 lines]
> thanx
> German