First of all, make sure you're xml file is saved as UTF-8.
It says so at the top of the file (encoding="utf-8"), but it isn't, which 
confuses the browser and therefor throws an error (in IE) 
or will display odd characters (in Firefox) when trying to view it directly:
http://www.heliospb.net/_2pestudio/xml/artigos.xml

Here's the exact same file, saved with UTF-8 encoding
http://muzakdeezign.com/2pestudio/artigos.xml

This will ensure it displays properly on all systems and allows you to 
view/debug the xml in a browser.

As for the bold text problem when assigning a new htmlText value, try setting 
the textfield.htmlText and textfield.text properties 
to an empty string before assigning the actual value.

_txt.text = _txt.htmlText = "";
_txt.htmlText = "<your_xml_string">;

I think that's how I solved it in the past..

Then there's a few more problems..
In IE 6, I can't see the top right text (on the grey background)
--> http://muzakdeezign.com/2pestudio/ie.gif
In Firefox, the first time I view the page, all fields display 'undefined'. 
When refreshing the browser, the text shows up.
--> http://muzakdeezign.com/2pestudio/ff.gif

This indicates that you're not properly loading the xml (trying to display it 
before it's loaded).

regards,
Muzak

----- Original Message ----- 
From: "Helios Pregioni Bayma" <[EMAIL PROTECTED]>
To: <flashcoders@chattyfig.figleaf.com>
Sent: Sunday, May 13, 2007 4:54 AM
Subject: [Flashcoders] Flash hmtlText weird problem


Hi,

New problem that looks like Flash bug, but it can be my mistake.

I have a dynamic html textField in Flash, that imports a text from XML, and
is formatted by CSS.
Lets say I have this text in XML (there are 2 texts in real XML):

<i><![CDATA[<b>Title of the text</b><br><br>Text body<br><b>Author: <a
href="http://www.someonesdomain.com"; target="_blank">someone</a></b>]]></i>

When I open the site in the browser, I can navigate in both texts (clicking
in buttons to call each), and everything is perfect, with the title and
author bold, and body not bold, normal text.
So I try clicking in the authors link inside the text, what opens another
browser window. But from this time on, if I change to the other text, both
appears all bold. The title, the body, the link, everything. And it happens
in both, I can change between them, and it happens all the time.

You can try it live here (http://www.heliospb.net/_2pestudio/artigos.html),
the links are in the bottom of both texts, and their links are "branding"
and "comunicao dirigida".

I looked for any wrong reference to the text, text style, nothing, the code
only handles it when its loaded and stays in a _root var.

Is it a bug of Flash or mine?

Another question is, do you have a clue why the link is hard to work in
Firefox while in IE just a click makes it open the other browser window?

Thanks,
Helios


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to