|
|
#1 (permalink) |
|
Junior Member
Join Date: Jun 2009
Posts: 1
|
Ok i purchased the RSS reader so that i can load the twitter or blogger RSS feed, but no luck, it works when I test movie, but not when i load it to a browser or upload to server.
I have the php.ini set up right on the server. Its running PHP5, and here is the link for the RSS: http://twitter.com/statuses/user_timeline/43232372.rss here is the code for AS. Code:
Stage.scaleMode = "noScale";
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(s:Boolean) {
preloader._visible = false;
if (!s) {
trace("Error loading/parsing XML !");
return;
}
// create a RSSFeed object
var RF:RSSFeed = new RSSFeed(this.firstChild); // pass the first child of the XML
// generate the list
news_list.generateList(RF);
// display other infos
info_txt.autoSize = true;
info_txt.text = "RSS version: "+RF.version;
info_txt.text += "\nLanguage: "+RF.language;
info_txt.text += "\nTitle: "+RF.title;
info_txt.text += "\nDescription: "+RF.description;
info_txt.text += "\nLink: "+RF.link;
};
xml.onHTTPStatus = function(httpStatus:Number) {
this.httpStatus = httpStatus;
if (httpStatus<100) {
this.httpStatusType = "flashError";
} else if (httpStatus<200) {
this.httpStatusType = "informational";
} else if (httpStatus<300) {
this.httpStatusType = "successful";
} else if (httpStatus<400) {
this.httpStatusType = "redirection";
} else if (httpStatus<500) {
this.httpStatusType = "clientError";
} else if (httpStatus<600) {
this.httpStatusType = "serverError";
}
trace(this.httpStatusType);
};
// RSS Feed url
var RSSUrl = "http://twitter.com/statuses/user_timeline/43232372.rss";
// get Domain
var urlStr:Array = this._url.split("/");
var domain:String = "";
for (var i = 0; i<urlStr.length-1; i++) {
domain += urlStr[i]+"/";
}
// load xml from another domain
//xml.load(domain+"news.php?url="+RSSUrl); // load using php from another domain
xml.load(RSSUrl); // load from url
//xml.load("news.xml"); // load local file
//xml.load(domain+"news.php?url="+RSSUrl);
//i also tried with above --- xml.load(domain+"news.php?url="+RSSUrl); ---and it didn't work
preloader.lbl_txt.autoSize = true;
preloader.lbl_txt.text = "Loading RSS Feed from "+RSSUrl+".\n Please wait...";
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT. The time now is 11:37 AM.








Linear Mode
