Loading XML in AS3...trying to make a news reader

Hello! I'm hoping someone can point me in the direction of a tutorial that shows how to create a "News Widget" from an XML file. I'm a designer so I know very little code...any help would really be appreciated!
I would like to create a Flash file using AS3 that pulls info from three different nodes in an XML file. The pic below is a screen shot of what I'm trying to accomplish.
Here's an example of my XML:
<?xml version="1.0"?>
<rss version="2.0">
<channel><title>kstp.com - MORE NEWS</title>
<item>
<title>State announces details of Minnesota FluLine </title>
<description><![CDATA[<img alt="" src="http://kstp.com/kstpImages/health_minnesota90.jpg" align="left" border="1" />The Minnesota Health Department will soon become the latest state to announce details of a toll-free nurse line for those... ]]></description>
<link>http://kstp.com/news/stories/s1202318.shtml?cat=1</link>
<subject/>
<creator>kstp.com</creator>
<pubDate>Wed, 21 Oct 2009 11:38:04 GMT</pubDate>
</item>
<item>
<title>Environmental group to look at MN water pollution </title>
<description><![CDATA[<img alt="" src="http://kstp.com/kstpImages/water_graphic.jpg" align="left" border="1" />An environmental group releases an analysis of industrial pollution in Minnesota's waters on Wednesday. <font size="2">Environment Minnesota says...</font>]]></description>
<link>http://kstp.com/news/stories/s1202345.shtml?cat=1</link>
<subject/>
<creator>kstp.com</creator>
<pubDate>Wed, 21 Oct 2009 10:13:46 GMT</pubDate>
</item>
</channel>
</rss>
For each row I would like to display the <title> info, <description> info and wrap all of that up in the <link> URL.
I imaging there is a good tutorial out there but I don't know enough to search using the correct terms.
Any help would be AWESOME!!
Thank you!
Melissa

You're probably not going to find too much in the way of a tutorial that arranges the content exactly the way you want it laid out.  I'm not sure what you mean when you say you want an example of how to display more than one node's worth of information.  From what I remember that tutorial has several entries, each having a few pieces of information.
Because some of your data appears to be html formatted, it may make it a little harder for you to control the layout.  You will probably have to go with some movieclip/textfield(s) combination in order to be able to format things the way you showed, possibly making use of the textfield's htmlText property.

Similar Messages

  • Loading XML in AS3

    OK, so I think I have the basics of loading XML in AS3. But I
    can't seem to access the info once it is loaded. I'm using the to
    load the .xml file:
    var myXML:XML = new XML();
    var XML_URL:String = "music.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    function xmlLoaded(event:Event):void
    myXML = XML(myLoader.data);
    trace("Data loaded.");
    But when I go to trace the .xml file with this:
    trace(myXML.toXMLString());
    I get nothing. However, if I place this trace inside the
    xmlLoaded function it traces it out. My problem is I want access to
    the info outside of that function. What am I doing wrong? Any
    advice or help would be greatly appreciated. Thanks.

    backpages,
    > But when I go to trace the .xml file with this:
    >
    > trace(myXML.toXMLString());
    >
    > I get nothing.
    This looks like a matter of timing. Your first five lines
    are
    encountered one after the other, starting with var myXML
    through
    myLoader.addEventListener(), which calls a function defined
    immediately
    below that. The function is called when the "complete" event
    is dispatched,
    which may take longer or shorter depending on the size of the
    XML document
    and network traffic. If you put a trace() statement
    immediately below that,
    Flash will execute that too -- and at the moment it does,
    your XML document
    hasn't loaded yet.
    > However, if I place this trace inside the xmlLoaded
    function it
    > traces it out. My problem is I want access to the info
    outside
    > of that function. What am I doing wrong?
    I copy/pasted your code exactly, then followed it with this:
    var t:Timer = new Timer(5000);
    t.addEventListener(
    TimerEvent.TIMER,
    function():void {
    trace(myXML);
    t.start();
    ... which waits five seconds, then runs that trace(). Sure
    enough, it
    outputs the XML contents.
    If you want to use the myXML variable elsewhere in your
    movie, you just
    have to make sure those other locations don't reference the
    variable until
    it has a value (or account for a lack of value in the logic
    they use). You
    might, for example, put a stop() action in frame one, along
    with the
    existing code (and instead of my timer), then have the
    "complete" event
    handler issue a play() action. In later frames, the myXML
    variable would
    have the data you need, because the playhead won't advance
    until the data
    have been loaded.
    David Stiller
    Co-author, Foundation Flash CS3 for Designers
    http://tinyurl.com/2k29mj
    "Luck is the residue of good design."

  • I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    Hi j2399123,
    It sounds like your screen recording is doing what it was designed to do, capture what is happening on your screen, with optional voice over with the microphone.
    Screen recording is for recording what you see on the screen, it is not a "video capture" option, like for capturing a movie with sound that is playing on your screen.
    For the QuickTime recording options, check out "Recording with QuickTime Player" in
    Mac Basics: QuickTime Player creates, plays, edits, and shares video and audio files
    http://support.apple.com/kb/ht4024
    And for screen recording specifically, there's
    QuickTime Player 10.x: Record your computer’s screen
    http://support.apple.com/kb/PH5882
    Thank you for thinking of Apple Support Communities for your support needs.
    Nubz

  • The iCloud was never verified therefore never backing up anything on my iphone 4s because it was the wrong email and now I'm trying to make a new one but it says if I delete the account it will remove it's data from my phone. Will I lose everything?

    The iCloud was never verified therefore never backing up anything on my iphone 4s because it was the wrong email and now I'm trying to make a new one but it says if I delete the account it will remove it's data from my phone. So if I put delete account will I lose everything on my Iphone?

    This was EXACTLY what I needed about the purchases I made from my device. However, is there a way to re-download other ones you've made from a computer? Because I realized some of them were not just purchased from my device.
    This is a picture of what it looks like now:
    http://tinypic.com/r/107quxu/7
    As you can see, the stuff circled in red doesn't give me an option to download from Cloud Beta because it already says "downloaded".
    any way to get around that?

  • Help!  I thought I was pretty good setting up slide shows and adding music.  I'm trying to make a new slide show from a great trip to New York.  I can get theme music but no music at all from iTunes.  Checking my older slide shows, which did play music!

    Help!  I thought I was pretty good setting up slide shows and adding music.  I'm trying to make a new slide show from a great trip to New York.  I can get theme music but no music at all from iTunes.  Checking my older slide shows, which did play music, it's all gone!
    Problem seems to have started after updating to Mavericks.
    Is there a box I need to check/uncheck?
    Any help very welcome!

    Hopefully you've seen the post from Terence Devlin?  I've pasted it below.
    In iTunes go File -> Library -> Organise Library -> Reorganise Library.
    Then quit and restart iPhoto.
    Pity Apple didn't either warn us or set up a bug fix!

  • I am trying to make a new ichat account

    I am trying to make a new ichat account. i go into preferences and go to accounts and hit the plus and click on creat an ichat account but when i fill in my information it says i need to change the feild underneath my vipcode and i have tryed it over and over again but it says its wrong.

    Seen this?
    Apple - Support - iChat

  • TRYING TO MAKE A NEW ACCOUNT

    So..
    Over the last couple of days I've realised my account might be hacked as I lost my iphone and believe it could've been left signed in and I also saw an iPhone emotion going to be sent and then it disappeared again.
    I also found out I had numerous accounts registered with my email address (the same email address each time) and I've been going through each Skype name/account that I apparently had registered and have changed the email address to each as well as all the information, however with my main account (which I think someone else is signed into) when I sign in online my name appears the same as what it did before I changed it to afj--- and then it changes to aif---
    I've also tried making a new account but each time it says I've already got a skype account registered even though I've been through all the accounts that it comes up with when I click forgot skype name (to see what accounts are registered with my email address and what the skype names are) and I've changed all the accounts that were registered with my email address to different information, deleted the contacts in each and changed the email addresses yet when I go to make a new account its STILL saying I've got an account registered with the email address! Its annoying too because I have to wait 24 hrs in order to search for any other accounts under my email address!!!!
    Account names redacted to protect privacy.

    Hi, Ursulallam_, and welcome to the Community,
    There is only one place you can go to get these account issues resolved: Skype Customer Service.  We here in the Community do not have the tools or the authority to address account-related matters, and as our Community Guidelines explain, the Community is not a branch of Skype Customer Service.
    Here is a link to the instruction on how to contact Skype Customer Service via their secure portal: Contact Customer Service
    Here are a few extra notes to guide you along the way ...
    You will need to proceed through each step, one at a time. Sign on to the Skype website as requested. Choose the subject and topic which most closely matches the item you need assistance with. Then, continue past Step 2 of the instruction where several articles from the FAQ library will appear for you to review, and proceed to Step 3, Continue Support Request (the blue "button" appears at the lower right corner of the website page). You may also skip through Step 4 where you will be referred back here to the Community; no need to do this as the Community is where you started. When you complete the web-form and click Submit, your information is relayed to Skype and you will receive a reply via e-mail unless you are transferred to start an instant message chat session with a Customer Service agent.
    If you experience any problems reaching Skype Customer Service, please try again using a different web browser than you typically use.  One of the Community's gurus explained to me that website scripting errors can cause these issues.  If you would kindly post back with what web browsers you used, including which links you clicked on and where exactly during the process your progress was halted, this would be most appreciated.  Screen shots would also be perfect -- as long as no personal information is shown.  Please also note which computer or device and its operating system that you used.
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Trying to make a new password without a disc

    So I bought a used macbook and the guy who sold me it, didn't send any discs and I can't get any updates on it. I've tried using the this code to get a new one...
    1. Hold Down Apple+S while booting computer
    2. Type: sh /etc/rc
    3. Type: passwd root (if that doesn’t work try admin or administrator instead of root)
    4. Enter in new password and confirm
    5. Type: reboot
    But when i type the password in, nothing at all shows up. And when I try to type it in when I update my software it just says "wrong password". So am I doing something wrong? Is there a more effiecent way of doing this? Thanks.

    Here's several methods (copied from prior posts) to reset the password without the install disc:
    1. boot computer and hold the "apple" key and the "s" key.
    2. wait for terminal show
    3. release keys
    4. type without the quotes: "/sbin/mount -uaw"
    5. press enter
    6. type without the quotes: "rm /var/db/.applesetupdone
    7. press enter
    8. type without the quotes: "reboot"
    9. press enter
    This will let you create a new admin account when you reboot your computer.
    Also, without the discs, look at Mac OS X Tip - No Password, No Root, No CD? No Problem.
    http://www.macobserver.com/tip/2003/06/16.1.shtml
    Here is a way to get around not knowing the admin password on Macs.
    To reset your OS X password without an OS X CD you need to enter terminal and create a new admin account:
    1. Reboot
    2. Hold apple + s down after you hear the chime.
    3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
    * mount -uw /
    * rm /var/db/.AppleSetupDone
    * shutdown -h now
    4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!
     Cheers, Tom

  • I tried to make a new album in Gallery, but I seemed to have accidentally deleted the photos, is there a way to retrieve the lost photos?

    I went on a vacation and took many photos with my iPad. On my flight back to the states, I tried making an album for my photos. It seemed like I accidentally deleted my photos. Is there a way to retrieve the deleted photos on the iPad?
    It is an iPad 2 w/ Wifi.
    I would appreciate any help.
    Thank You.

    Not sure you can create a smart playlist from your iPhone. I think you need to create it on your computer...

  • MacBook crashes when trying to make a new user account

    Hi Guys,
    I want to make an additional user account on my MacBook. I am going through the normal steps but when the screen pivots to reveal the new desktop screen after clicking on the new account holder the screen then completely freezes. the only way to exit is by holding the power button down.
    Can anyone help? Is this a software malfunction? Virus?
    Thanks

    Hi Baron,
    How are you toggling to the new user? Are you going through the login window or are you going through fast user switching from the existing user? You might want to first try deleting the account and then recreating it. If the whole OS is freezing on login then there's perhaps something wrong with the user account, given that it's brand new it's possible that there was a backend account creation process that was not done properly. Not exactly something you can easily control.
    I don't think it's a virus.

  • HT204053 hello i have tried to make a new apple id. because my daughter knew my old password and i wanted to change the email address.

    please can you help me delete my old apple id?
    [email protected]  i have forgot my password after trying to change it, after i found out my daughter had been using it.
    i have now set up a new one.

    You cannot delete an id.
    Why would you?
    All purchases made with that account will always be tied to that account.  Your computers will need to be authorized for this account and you will have to update any apps using that account.
    Just change your password and the email address associated with the account.
    You should not leave your account info here.  Apple is not here.  We are all itunes users just like you

  • I deleted my music library by mistake! I had already made a playlist on my  computer at work but found out there is no CD burner on that computer so I am trying to make a new playlist on a different computer and it won't let me. Anyone off any advise?

    I need help with syncing my Iphone to a computer that is not mine. I had synced music onto my work computer only to find out it didn't have a CD burner and now it won't let me download on a new computer. In the meantime, I lost all of my purchased music from my phone!! Can anyone help?

    Wow that was really quick, thank you so much.  Im not sure at all which version it was because i said it was around 4 years ago he bought it.  I know it isn't under his username, since he's a PC person (ugh) so i know its probably registered to one of our actual names.  isn't there some way to look it up since we did register it, because I'm not even sure where the disks are from when we bought it (we've moved a lot and also have two storage lockers, i know i would have kept it with other disks) but my cd rom drive is actually broken on my computer as well ( i think it got stepped on and is now squished and won't eject or run disks.)
    So is there anyway they can look up that its registered to one of our names since we did register it when we bought and installed it, or do i really have to find the disk with some sort of proof of purchase (i know there would be no receipt after all this time)
    either way, ill do what you suggested to the best of my abilities and thank you so much for answering my questions, i can't even open the program as its incompatible and find out the info from that) so I'm in a bit of a pickle and your response was so thorough and it didn't seem to be posted long enough to even write a well researched response, thanks, all the best,
    sarucia

  • Where is the "On My Mac" section? Tried to make a new folder for junk as a sub-folder in Trash. Didn't realize the location was set for "On My Mac" and now I can't find it.

    Want a junk folder that I can see. Also, I did see this question elsewhere with no answer: when an email is brown & says it's junk, there is no option for saying it's not junk and to not mark email from that sender as junk again.

    If the old ID is yours, and if your current ID was created by editing the details of this old ID (rather than being an entirely new ID), go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • I was trying to make a apple id but typed in the wrong email address

    So i was trying to make a new apple id for my ipod touch because i got a gift card but i think i typed in the wrong email address because i have not gotten the comformation email yet. While your signing up it asks you if you want to add a gift card so i added my gift card but now if i cant get into my apple id then i just lost $15. please help

    Contact iTunes:
    Apple - Support - iTunes - Contact Us

  • I'm trying to make a apple I'd in Canada

    I'm trying to make a new apple I'd in Canada but I'm in Montreal and I'm not sure what the province is because when I look in the provinces Quebec is not on there so what do I do

    I have same problem. I could only see a fraction of my project photos if I browse the Aperture lbrary. It is the same problem when I sync the aperture photos to my iPhone or iPad. I still cannot solve it but I know a way to go around it for your iMovie to see the pictures so that you can work on your iMovie.
    Here is the work around:
    Export the photos from your album to your hard disk and re-import into your iPhoto. Now you should be able to see those photos that you want to work on in iMovie when you browse your iPhot library.

Maybe you are looking for