Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

rss not loading as3 flash

Posted on 2010-08-28
4
Medium Priority
?
445 Views
Last Modified: 2012-05-10
hello folks,
my as3 rss reader only reads from some site but not others. its loaded on my company's intranet server where some sites cannot be read. It works fine from my laptop.  What am I missing? The weather rss works,  the blog does not.  Thanks.
code:

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);

lb.addEventListener(Event.CHANGE, itemChange);

function itemChange(e:Event):void
{
	ta.text = lb.selectedItem.data;
}

var xml:XML;

function onLoaded(e:Event):void
{
	
	xml = new XML(e.target.data);
	var il:XMLList = xml.channel.item;
	for(var i:uint=0; i<il.length(); i++)
	{
		lb.addItem({data:il.description.text()[i],
						label:il.title.text()[i]});
	}
}

//loader.load(new URLRequest("http://theflashblog.com/?feed=rss"));

loader.load(new URLRequest("http://weather.yahooapis.com/forcastrss?p=01012"));

Open in new window

0
Comment
Question by:Baz487
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

by:Baz487
ID: 33551444
Ok,
I added error listeners and I found this is the error:
SecurityErrorError #2048
Anyway to work around that ?

Thanks,

Baz
0
 

Author Comment

by:Baz487
ID: 33551472
I  believe I read somewhere that Flash CS4 allows crossdomain xml reading.. Im not sure if thats true. What makes no sense is why can I read:
http://weather.yahooapis.com/forecastrss?p=07029
but I get an error with :
http://www.starallianceemployees.com/news.100.html

Thanks
0
 
LVL 37

Accepted Solution

by:
CyanBlue earned 2000 total points
ID: 33551529
That's because there is this file in the Yahoo domain...
   http://weather.yahooapis.com/crossdomain.xml

whereas there is no crossdomain.xml in the other domain...
   http://www.starallianceemployees.com/crossdomain.xml

That tells me that Yahoo allows anybody to use their data whereas the other domain does not want anybody to scrap their data...

It should work fine on your local computer with file protocol, but it should not work on the internet with http protocol because they use different security model for handling this stuff...

CyanBlue
0
 

Author Comment

by:Baz487
ID: 33552890
thanks.


Can crossdomain permission be given to a specific site, or once they add a crossdomain xml does everyone has acces?.

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question