Old 06-18-2009, 07:54 AM   #1 (permalink)
Junior Member
 
Join Date: Jun 2009
Posts: 1
Default Loads Twitter RSS local but not online

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...";
What am I doing wrong?
indalab is offline   Reply With Quote
Old 06-20-2009, 10:15 PM   #2 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,981
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

Use this line:
xml.load(domain+"news.php?url="+RSSUrl); // load using php from another domain
in your code, and comment the other
Adrian is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:37 AM.