# XML Image Display

**URL:** https://forum.kirupa.com/t/xml-image-display/189647
**Category:** flash
**Created:** [June 4, 2006, 11:15pm UTC](https://forum.kirupa.com/t/xml-image-display/189647 "2006-06-04T23:15:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![erikakers](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/erikakers/32/2460_2.png) [@erikakers](https://forum.kirupa.com/u/erikakers)
#### Post date: [June 4, 2006, 11:15pm UTC](https://forum.kirupa.com/t/xml-image-display/189647/1 "2006-06-04T23:15:14Z")

</div>

I trying to display a single image and a couple lines of text in Flash . I have a XML script that updates itself and I just want flash to pull this updating info. I would like to have transitions but one step at a time here.

Okay here is the XML File I’m using:

```auto

<?xml version='1.0' encoding='utf-8'?>

<now_playing playing="1">
    <song>
        <title><![CDATA[Dance, Dance]]></title>
        <artist><![CDATA[Fall Out Boy]]></artist>
        <album><![CDATA[From Under the Cork Tree]]></album>
        <genre><![CDATA[Alternative]]></genre>
        <kind>Protected AAC audio file</kind>
        <track>3</track>
        <numTracks>13</numTracks>
        <year>2005</year>
        <comments><![CDATA[]]></comments>
        <time>180</time>
        <bitrate>128</bitrate>
        <urlAmazon>http://www.amazon.com/exec/obidos/redirect?tag=Akersone-20%26link_code=xm2%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=B000929AU0%2526tag=Akersone-20%2526lcode=xm2%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/B000929AU0%25253FSubscriptionId=03AKJ1J6S0FY8K0WRER2</urlAmazon>
        <imageSmall>http://images.amazon.com/images/P/B000929AU0.01._SCTHUMBZZZ_.jpg</imageSmall>
        <image>http://images.amazon.com/images/P/B000929AU0.01._SCMZZZZZZZ_.jpg</image>
        <imageLarge>http://images.amazon.com/images/P/B000929AU0.01._SCLZZZZZZZ_.jpg</imageLarge>
        <file><![CDATA[03 Dance, Dance.m4p]]></file>
        <artworkID>defecf1f0160862aa242443d91964d74</artworkID>
    </song>
</now_playing>
    

```

Using the displaying XML data in flash tutorial I was abel to get the text that I want display using this ActionScript code:

```auto

function loadXML(loaded) {

if (loaded) {

_root.artist = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.title = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
band_txt.text = _root.artist;
song_txt.text = _root.title;
} else {
  trace("file not loaded!");

}

}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("now_playing.xml");

```

I just want to be able to pull the imageLarge tag from the XML in to the flash movie. This XML changes everytime the song that I’m listening on  
iTunes changes so I would like to have the Actionscript refresh say like every 4 minutes and have a transition for the new info. Any help to get me started in this direction would be great.

Thanks ahead of time.
