_loader.addEventListener(Event.COMPLETE, urlLoader_complete);
function urlLoader_complete(evt:Event):void{
_currentTweets = new XML(evt.target.data);
_currentTweets = removeNS(_currentTweets);
for(var x:int = 0; x<_currentTweets.entry.length(); x++){
var $temp: String = _regExTag.exec(_currentTweets..title[x]);
if( $temp != null)
$topics.push($temp);
}
}
Now, please excuse my French but how the name of flying goose piss do I retrieve the XML file on completion? Actually what I want to get is my $topics list but I would settle for the XML file. NO matter what I do (The $topics list and _currentTweets are global variables) within the function/event handler....the changes only exists within the function/event handler.
I.E If I trace _currentTweets within then event handler it displays the whole thing, however if I do it after the event handler has run...._currentTweets returns to its original state of null. Like wise for the topics list.
I understand that you CANT return values from an event handler but as the Loader must use the event Handler it seems like the stupidest idea ever that you cannot affect the rest of the program with it.
Now, I may be just be being stupid here (Action Script is not my field, this is a Uni project) but could anyone please put me out of my misery? Or even suggest an alternative if I just cannot do what I want to with this piece of code?
Thanks for all the help. I hope me problem is clear and apologies if this is in the wrong place.
Later
Kevin

New Topic/Question
Reply



MultiQuote



|