Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
Reading and displaying RSS feeds in Flash MX

Reading and displaying RSS feeds in Flash MX

2004-03-11       - By Merrill, Jason

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Yes.

- keeping it onlist:

:::>Nothing shows up. Is "o" not available outside the function
:::>block? Is there
:::>a way that I can make it available?

Yes, you are trying to access the o object before the XML is done loading.
Darron mentioned this earlier actually (no problem, its a lot to keep track of!
)  That's why the traces in the code I posted are inside the funciton block.
You can tell flash to do whatever you want to let you know its done, like say
move the playhead to the next frame where you do your text displays.  Just put
the desired command in the function block where I put the traces (after the
XMLtoObject call).  Then do whatever you need to do to display the text - like
have it in frame 2 or something.

In other words, don't try and display the XML before its ready.


:::>Also, is there a way of determining how many "item"'s there
:::>are dynamically?
:::>Since I am going to be grabbing this from the net, the
:::>number of items may
:::>change periodically. If I could determine this, I could
:::>loop through all of
:::>them with a "for".

Yes, any node that has more than one of the same kind is made into an array, so
just check the length of the Array, like this:

howManyItems = o.rss.channel.item.length;

Since there are several "item"nodes, item is an array object.  Pretty cool huh.


  Jason Merrill
  ICF Consulting Government e-Learning Solutions
  icfconsulting.com









:::>-- --Original Message-- --
:::>From: BRYAN MASON [mailto:BMASON@(protected)]
:::>Sent: Thursday, March 11, 2004 3:29 PM
:::>To: 'flashnewbie@(protected)'
:::>Subject: RE: [Flashnewbie] Reading and displaying RSS feeds
:::>in Flash MX
:::>
:::>
:::>Jason,
:::>
:::>Did you get my e-mail reply? If not, I will re-post here. I
:::>got your code to
:::>work, but I have some follow-up questions about how to use
:::>the XML Object.
:::>
:::>Bryan
:::>
:::>-- --Original Message-- --
:::>From: Merrill, Jason [mailto:JMerrill@(protected)]
:::>Sent: Thursday, March 11, 2004 2:08 PM
:::>To: flashnewbie@(protected)
:::>Subject: RE: [Flashnewbie] Reading and displaying RSS feeds
:::>in Flash MX
:::>
:::>
:::>This list is so *&%$#@! slow today!  Hopefully, you've seen
:::>my reply to this
:::>by now.  I also replied to you offlist just in case.
:::>
:::>   Jason Merrill
:::>   ICF Consulting Government e-Learning Solutions
:::>   icfconsulting.com
:::>
:::>
:::>
:::>
:::>
:::>
:::>
:::>:::>-- --Original Message-- --
:::>:::>From: BRYAN MASON [mailto:BMASON@(protected)]
:::>:::>Sent: Thursday, March 11, 2004 1:31 PM
:::>:::>To: 'flashnewbie@(protected)'
:::>:::>Subject: RE: [Flashnewbie] Reading and displaying RSS feeds
:::>:::>in Flash MX
:::>:::>
:::>:::>
:::>:::>Darron,
:::>:::>
:::>:::>Thanks for the correction on the var keyword. However, I
:::>:::>tried your code and
:::>:::>it still comes back as undefined. I'll keep playing with it.
:::>:::>
:::>:::>Bryan
:::>:::>
:::>:::>-- --Original Message-- --
:::>:::>From: Darron J. Schall [mailto:darron@(protected)]
:::>:::>Sent: Thursday, March 11, 2004 12:40 PM
:::>:::>To: flashnewbie@(protected)
:::>:::>Subject: Re: [Flashnewbie] Reading and displaying RSS feeds
:::>:::>in Flash MX
:::>:::>
:::>:::>
:::>:::>> The .as file is in the same dir as the FLA. I saved the
:::>:::>XML that I got
:::>NOTICE:
:::>This message is for the designated recipient only and may
:::>contain privileged
:::>or confidential information. If you have received it in
:::>error, please notify
:::>the sender immediately and delete the original. Any other
:::>use of this e-mail
:::>by you is prohibited.
:::>
:::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
:::>-- ------
:::>Supported by Fig Leaf Software
:::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
:::>-- ------
:::>Lower Prices for Certified Training! Check out new lower prices for
:::>Certified Macromedia Training from Fig Leaf Software. Expand your
:::>skill set with courses in ColdFusion, Flash, Rich Internet
:::>Applications and .NET in the new year.  Fig Leaf Software provides
:::>the highest caliber instruction at our training centers in
:::>Washington
:::>D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
:::>your location.
:::>
:::>Get the details at http://training.figleaf.com/
:::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
:::>-- ---- --
:::>To unsubscribe, e-mail:
:::>flashnewbie-unsubscribe@(protected)
:::>For additional commands, e-mail:
:::>flashnewbie-help@(protected)
:::>
:::>
:::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
:::>-- ------
:::>Supported by Fig Leaf Software
:::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
:::>-- ------
:::>Lower Prices for Certified Training! Check out new lower prices for
:::>Certified Macromedia Training from Fig Leaf Software. Expand your
:::>skill set with courses in ColdFusion, Flash, Rich Internet
:::>Applications and .NET in the new year.  Fig Leaf Software provides
:::>the highest caliber instruction at our training centers in
:::>Washington
:::>D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
:::>your location.
:::>
:::>Get the details at http://training.figleaf.com/
:::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
:::>-- ---- --
:::>To unsubscribe, e-mail:
:::>flashnewbie-unsubscribe@(protected)
:::>For additional commands, e-mail:
:::>flashnewbie-help@(protected)
:::>
:::>
:::>

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
For additional commands, e-mail: flashnewbie-help@(protected)