Text.htmlText

hi

I am using a static textfield that is used to diplay the html formatted text for different links.

I am using an xml file that contains the contents in an html formatted tags.

I have an objective link that has the following value <li>bullet point 1</li><li>Bullet point2</li>

If the user clicks objective link then the text is diplayed in bulleted form in AS3 textfield

when the user clicks other text field link contact us then the contact us text is also displayed with bullet points.

Can anyone tell why the bullets are still appearing?

It’s difficult to tell unless you show the code…
But you may check this one out, it’s an example of using htmlText links with AS functions:

var text_xml:XML = <xml>
<![CDATA[
   <li><a href='event:1'>entry 1</a></li>
   <li><a href='event:2'>entry 2</a></li>
   <li><a href='event:3'>entry 3</a></li>
   <li><a href='event:4'>entry 4</a></li>
   ]]>
</xml>;
var tf:TextField = new TextField();
tf.border = true;
tf.width = 200;
tf.height = 200;
tf.multiline = true;
tf.wordWrap = true;
addChild(tf);
tf.addEventListener(TextEvent.LINK, handleLinkPress);
function resetText(i:int=0):void {
 var r_str:String = String(text_xml.text()).replace(/[\r|
|	]/g, '');
 switch(i){
  case 0:
  default:
   break;
  case 1:
   r_str = r_str.replace(/<li>.{15}1.{1,}?<\/li>/g, '<li>entry 1 clicked</li>');
   break;
  case 2:
   r_str = r_str.replace(/<li>.{15}2.{1,}?<\/li>/g, '<li>entry 2 clicked</li>');
   break;
  case 3:
   r_str = r_str.replace(/<li>.{15}3.{1,}?<\/li>/g, '<li>entry 3 clicked</li>');
   break;
  case 4:
   r_str = r_str.replace(/<li>.{15}4.{1,}?<\/li>/g, '<li>entry 4 clicked</li>');
   break;
 }
 tf.htmlText = r_str;
}
function handleLinkPress(evt:TextEvent):void {
 resetText(int(evt.text));
}
resetText();

hello wvxwvw:)

Thanks for your time and you are rite it is difficult to tell without looking at the code. But I figured out the problem it was just I was not closing one of <li> tags properly so thats why it was giving strange results no wonder.

Thanks for your time appreciate that.

Do you know any good software that represents the AS3 classed of ur project in the form of UML diagram?

Glad it’s solved =)
I actually don’t use UML utilities much (I use FD and the way it displays classes and packages seem to be enough for me), the only utility I tried for this purpose was FreeMind. No complains though, it worked fine =)
http://freemind.sourceforge.net/wiki/index.php/Main_Page (it’s free to download and use, distributed under GPL) Mind it, you need the latest beta, not a release version

Thanks I will give it a try.