Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I get bold text on this xml-element with AS3?

New Here ,
Jun 07, 2013 Jun 07, 2013

How do I get bold text on this xml-element with AS3?

It goes to a scrollable list component, where I have 2 lines of text per "button".

I do not want to do it in the XML file (due to practical reasons.)

The element(s) I want to show as bold through the list component is in bold in the code below:

var loader:URLLoader = new URLLoader();

loader.addEventListener(Event.COMPLETE, onLoaded);

list.addEventListener(Event.CHANGE, itemChange);

function itemChange(e:Event):void

{

          ta.text = list.selectedItem.data;

}

var xml:XML;

function onLoaded(e:Event):void

{

          xml = new XML(e.target.data);

          var il:XMLList = xml.Planter.Lauvtre;

          for(var i:uint=0; i<il.length(); i++)

          {

                    list.addItem({data:il.Farge.text(),

                                                            label:il.Botanisk_navn.text() +"\n"+ il.Norsk_navn.text() });

          }

}

loader.load(new URLRequest("lauvtre.xml"));

TOPICS
ActionScript
815
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jun 09, 2013 Jun 09, 2013
LATEST

that depends what you want to use to render your data on screen.

If you use a Textfield you can simply display the content with htmlTexts <b> Tag

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines