AS3 Twitter Feed Error 1010
Hi
I'm trying to create a simple Twitter feed for a Flash website. When I run the flash movie however I get the following messages appear in the Output window:
TypeError: Error #1010: A term is undefined and has no properties.
at Cinema_fla::MainTimeline/processXML()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
I am using Flash CS6 and the AS3 code for my Twitter feed is shown below:
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=YahooMoviesUK"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void{
var myXML:XML = new XML(e.target.data);
txtTweet1.text = myXML.status[0].text;
txtTweet2.text = myXML.status[1].text;
txtTweet3.text = myXML.status[2].text;
}
I would be grateful if anyone could give me some advice as to why this error is occurring. If you need any more info please let me know.
Thanks
