Error #1010: A term is undefined and has no properties.
Displaying of twitter status in flash via twitter with URLLoader.
Line 394:
Note: xml.status[num].user.statuses_count is equals to 21, however when flash tried to retrieve the last status, which is number 21, it crashes with Error #1010. Why it doesnt want to retrieve the last status??
But when xml.status[num].user.statuses_count is equals to 20, it will retrieve all of the 20 status, including the last status with no Error. This is very weird, I have no idea what is happening
Is there any Error Event Listener I can use to catch this kind of error so that my flash will still be operational when it happens again?
for (var i = 0; i <xml.status[num].user.statuses_count; i++)
{
post_array = ContentCount;
ContentCount++;
content_string += getContent(post_array);
}
Line 450:
private function getContent(num:Number) {
//show just month, day and hour
var posted:String = xml.status[num].created_at;
var content:String = "<font color='#00000'><a href=" + '"http://twitter.com/' + USERNAME + "/statuses/" + xml.status[num].id + '" target="_blank">' + xml.status[num].text + "</a></font><br/><font size='9' color='#333333'>" +"Posted on: " + posted.substr(0, posted.length - 11) + "; " + "From: " + xml.status[num].source + "</font><br/><br/>";
//return all info
return content;
}
TypeError: Error #1010: A term is undefined and has no properties.
at fladev.twitter::MainClass/getContent()
at fladev.twitter::MainClass/displayInfo()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()