[as]// create a new XML object
var sports:XML = new XML();
// set the ignoreWhite property to true (default value is false)
sports.ignoreWhite = true;
// After loading is complete, trace the XML object
sports.onLoad = function(success) {
trace(sports);
};
// load the XML into the sports object
sports.load(“http://rss.news.yahoo.com/rss/sports”);[/as]
Helmut, pardon my ignorance, I tried to solve it myself but with no success…
I want to use your “Loading RSS feed into Flash” script and it works fine, but I do not know how to capture the output and save it as an xml file. My ultimate objective is to have just the entries from the xml displayed in a list component.
Best regards,
Martin
This is cool but I can’t see the info, I can see it in the output box
only.
Yesssss. Finally. Just the base code of loading the RSS, not some super long and advanced script. 😀
Hey guys, to pull the feed into a text field, follow these steps:
Create a dynamic multiline text field and give it a variable name, i.e. txt_feed.
Then just insert this script into the onLoad function:
sports.onLoad = function(success) {
txt_feed = sports;
trace(sports);
};
I still just get it in my output window 🙁
Is there any way to combine this with:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
caption = [];
url = [];
total = xmlNode.childNodes.length;
for (i=0; i=0) {
newsMC.newsText._alpha -= 5;
} else {
display(p);
p++;
delete this.onEnterFrame;
}
};
}
hum… the whole message didn’t show up.
Check out http://www.maihtas.com/flash_news_ticker.html
Hey guys.
I’ve set up all the code and made a dynamic multiline text field for the feed to goto, yet still I can only see my feed in the output box!
Any ideas?
No dice. Couldn’t get this to work.
Davidious, are you publshing with Actionscript 2.0?
i get it all to work but it just displays the source of the XML file, can i get it to display specific tags, or even format the content inside my text field?
It is supposed to show you only the output (text) to use as a blue print. With the content now you can target specific tags or do as you wish with it 🙂
please forgive my ignorance… I’m totally a begginer and have only used flash for motion files in the past, and I understand very little about web stuff. I want to place this feed from my external blog in a box on my “blog” page in my flash site… and of course have it link to the external blog site, if they want to read more. I put this code in an action box on a layer in the keyframe of my “content page” movie designated for that page content. I used the code, and like you said the output showed that it works… what do I do next in order to set the parameters for this feed to show up on that page in a box or whatever the size of my choosing? thank you in advance for any help you can give… I feel like I’m in over my head,… 🙂 thanks a bunch!
I managed to get this to work no problem. Now my question is.. is it possible to have the photos from the blog that is getting fed into flash show up and also, is there a way to make this look a little more organized? as of now im getting the text from the blog, but there is no space between each blog.
I managed to get this to work no problem. Now my question is.. is it possible to have the photos from the blog that is getting fed into flash show up and also, is there a way to make this look a little more organized? as of now im getting the text from the blog, but there is no space between each blog.
Thanks
Im doing somthing wrong because te feed is coming thru but its not rendering its just showing the source.
It works fine ! If its not showing in the text box i would suggest clicking “embed…” under the properties of the txt box and selecting they data you want to display !
If that doesnt work then i dont know.
I’m working in actionscript 2.0 and want to be able to use my rss blog feed for the news segment. I’m having the same problem, the rss feed only shows up in the output pane.
about RSS comment in AS3
hii there I like to know now to create/add RSS comment into an flash website using with AS3
I deff need to add a AS3 sample.
If you’re working in AS2 the only thing that needs to be done to integrate this to the stage is to first create a dynamic text box named “number1_txt” and add the following:
sports.onLoad = function(success) {
trace(sports);
_root.uno = this.firstChild.childNodes[0].childNodes[0].childNodes[0].firstChild.nodeValue;
number1_txt.text = _root.uno;
};
You work your way through your rss feed/xml by changing the [0]’s in that code. but that code should give you something to start with.
Thanks for the great tutorial… I still can’t quite make it work. In the dynamic text field (I’m using as2) it says, “undefined.”
The feed is showing up in the output box… not sure what to do.
What does it mean to work through the feed by changing the [0]’s?
I’m trying it with AS 2 Flash player 10 settings.
All I get is the text “eie” in the field, but there is no such text in the rss feed, or in the script.. Can this work?
you must be so frustrated writing an example and having all sorts of questions that indicate to you that your commenters are not on the same page as you or have not understood that loading and displaying are quite seperate things altogether.
thanks for the snippet, i somehow forgot that rss is xml, going to try to use it to pull wordpress posts into flash…