# Question about the tutorial "Loading data into Flash" By: Jorge Solis

**URL:** https://forum.kirupa.com/t/question-about-the-tutorial-loading-data-into-flash-by-jorge-solis/313560
**Category:** flash
**Created:** [September 2, 2010, 4:01pm UTC](https://forum.kirupa.com/t/question-about-the-tutorial-loading-data-into-flash-by-jorge-solis/313560 "2010-09-02T16:01:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rculshaw](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rculshaw](https://forum.kirupa.com/u/rculshaw)
#### Post date: [September 2, 2010, 4:01pm UTC](https://forum.kirupa.com/t/question-about-the-tutorial-loading-data-into-flash-by-jorge-solis/313560/1 "2010-09-02T16:01:22Z")

</div>

Hi

I’ve already posted this in AS2 but I think its AS3

I followed a tutorial about loading data into Flash using xml. Everything works perfectly but I would like to add hyper links to the images.

Any ideas?

I’m new to this and trying to work it out. I’m presuming I need to add:

this.ref[" …something here… "+i].getURL(subnodes[2].firstChild.toString())

but its out of my zone at the moment.

Here is the ActionScript

* * *

//Create the XML Object  
myXML = new XML()  
myXML.ignoreWhite = true  
//Load XML file  
myXML.load(“anastasio.xml”)  
//Make a reference to current timeline  
myXML.ref = this  
// Parse XML and fetch  
myXML.onLoad = function(succes){  
if(succes){  
var root = this.firstChild  
nodes = root.childNodes  
for(var i=0; i\<nodes.length; i++) {  
this.ref[“Title\_txt”+i].text = nodes\*.attributes.name  
subnodes = nodes\*.childNodes  
this.ref[“Comments\_txt”+i].text = subnodes[0].firstChild.toString()  
this.ref[“holder\_mc”+i].loadMovie(subnodes[1].firstChild.toString())

}  
} else trace(“Error loading XML document”)  
}  
stop()

* * *

and the xml

* * *

\<?xml version=“1.0” encoding=“UTF-8”?\>  
\<!DOCTYPE data[  
\<!ELEMENT title (comments, image)\>  
\<!ATTLIST title name CDATA #REQUIRED\>  
\<!ELEMENT comments (#PCDATA)\>  
\<!ELEMENT image (#PCDATA)\>  
]\>  
\<data\>

\<title name=“Whats New”\>  
\<comments\>the summer is here and so are our lightest summer dresses…  
\</comments\>  
\</title\>  
\<title name=""\>  
\<comments\>Photo Shoot movie  
\</comments\>  
\<image\>an1.jpg\</image\>  
\</title\>  
\<title name=""\>  
\<comments\>Jersey bling dress, brown  
\</comments\>  
\<image\>an2.jpg \</image\>  
\</title\>  
\<title name=""\>  
\<comments\>Bubble dress, smudge rose and hot flowerk  
\</comments\>  
\<image\>an3.jpg\</image\>  
\</title\>  
\<title name=“Our lookbook”\>  
\<comments\>View this seaons look book  
\</comments\>  
\<image\>an4.jpg\</image\>  
\</title\>  
\<title name=""\>  
\<comments\>Send us your photos  
\</comments\>  
\<image\>an5.jpg\</image\>  
\</title\>  
\<title name=""\>  
\<comments\>Ying yang dress, hot pink  
\</comments\>  
\<image\>an6.jpg\</image\>  
\</title\>  
\<title name=""\>  
\<comments\>New yorker playsuit, shell pink  
\</comments\>  
\<image\>an7.jpg\</image\>  
\</title\>  
\<title name=“Bridesmaid lookbook”\>  
\<comments\>Bridesmaid collection  
\</comments\>  
\<image\>an8.jpg\</image\>  
\</title\>

\</data\>
