i can't get variable in function.
Posted
by kaym
on Stack Overflow
See other posts from Stack Overflow
or by kaym
Published on 2010-06-02T18:14:36Z
Indexed on
2010/06/02
18:24 UTC
Read the original article
Hit count: 151
i can't read the variable in the function, i want to use it outside the function, here is my code.
var contentLoader:URLLoader = new URLLoader(); contentLoader.load(new URLRequest("http://localhost/data.php"));
function onComplete(event:Event):void {
var txtu:String = event.target.data;
} contentLoader.addEventListener(Event.COMPLETE, onComplete);
trace(txtu);
thanks.
© Stack Overflow or respective owner