For those of you who are trying to load an XML file from another domain into your Flash movie, I’m sure you’ve noticed the security restriction. Files can only be imported from the same domain that your SWF file is in. There is a way to put a special file on another domain but this isn’t practical if you want to load an RSS feed from Yahoo or something. Its doubtful that they will host your security file 

Below is a snippet of PHP code that you can use to retrieve an external XML file. Just make sure this PHP file is in the same domain as your SWF.
[php]< ?PHP
$line=file("http://rss.news.yahoo.com/rss/topstories");
foreach ($line as $line_num => $line) {
echo $line;
}
?>[/php]
No comments:
Post a Comment