var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("faq.xml"));
xmlLoader.addEventListener(Event.COMPLETE, onXMLLoad, false, 0, true);
function onXMLLoad(event:Event):void
{
var newsXML:XML = new XML(event.target.data);
var n:int = newsXML.item.length();
for (var i:int = 0; i < n; i++)
{
var tile:Tile = new Tile();
tile.headerTxt.htmlText = newsXML.item[i].name.text();
//get content from <txt> tags. Then add data from <linkurl> and <linkname>
tile.infoTxt.htmlText = newsXML.item[i].txt.text()+" <font color='#FFFFFF'> <a href='"+newsXML.item[i].linkurl.text()+"'>"+newsXML.item[i].linkname.text()+"</a></font>";
tile.infoTxt.multiline = true;
tile.infoTxt.autoSize = TextFieldAutoSize.LEFT;
tile.infoTxt.width = 610;
tile.y = scrlContainer.height;
trace("tile " + i + " y position: " + tile.y);
trace("tile " + i + " height property = " + tile.height);
trace("");
scrlContainer.addChild(tile);
}
}
WHAT'S NEW?
Loading...
load xml textAutosize height
- Judul : load xml textAutosize height
- Penulis : PF studio
- Kategori : Archive Code Snippets
-
Rating : 100% based on 10 ratings. 5 user reviews.
Item Reviewed: load xml textAutosize height
9 out of 10 based on 10 ratings. 9 user reviews.
facebook
twitter
google+
fb share