i can't get variable in function.
- by kaym
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.