XML
<?xml version="1.0"?>
<config>
<api><![CDATA[http://xxx]]></api>
<secure><![CDATA[1]]></secure>
</config>
AS
function loadXML():void{
var request_show:URLRequest = new URLRequest("frame/config.xml");
var loader_php:URLLoader = new URLLoader(request_show);
loader_php.addEventListener(Event.COMPLETE,search_Complete);
loader_php.load(request_show);
}
function search_Complete(e:Event):void {
configXML = XML(e.target.data);
trace(configXML.api[0].text());//output: http://xxx
trace(configXML.secure[0].text());//output: 1
}
as3 load XML
2011年8月25日 星期四 by Hu, Ching-Hsiang
Filed under
having
0
意見
as3 unixtime
2011年8月21日 星期日 by Hu, Ching-Hsiang
var myDate = new Date();
trace(myDate);
var unixTime = Math.round(myDate.getTime()/1000);
trace("Unix Time: "+unixTime);
var dateNew = new Date();
dateNew.setTime(unixTime);
trace(dateNew);
Filed under
having
0
意見
as3 TLFTextfield's text Always update, memory can't be release
2011年8月10日 星期三 by Hu, Ching-Hsiang
TLFTextfield的文字如果不斷更新~~記憶體不會被釋放
if TLFTextfield's text Always update, memory can't be release
Filed under
having
0
意見
訂閱:
文章 (Atom)