# Actionscript on XML lodaded images

**URL:** <https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132>\
**Category:** flash\
**Created:** [June 12, 2008, 8:18pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132 "2008-06-12T20:18:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![artriste](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@artriste](https://forum.kirupa.com/u/artriste)\
**Post date:** [June 12, 2008, 8:18pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/1 "2008-06-12T20:18:55Z")

</div>

I have a slide show displaying random images from an xml file, as the intro for my portofolio.

**What I need** :

When an image is clicked, I want the user to be redirected to the categorie of the clicked image.

My ideas so far…  
Lets say I have:

```auto

<gallery>
<image path="images/1.jpg" category="a"/>
<image path="images/2.jpg" category="b"/>
<image path="images/3.jpg" category="c"/>
</gallery>

```

How can I use these category labels into flash to direct the user where it should?  
Maybe a script that creates an empty MC behind the slideshow which behaves like a button? Don’t really know how to properly explain it, but could this empty MC have a function that goes like: onRelease () function = \_root.menu1.gotoandStop = ("[categorie]");

where [categorie] is loaded from the XML file on the currently shown image.

I think that’s the proper mechanics behind what I’m trying to achieve… I just don’t really know how to grammatically put it together.

Thanks

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 12, 2008, 8:32pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/2 "2008-06-12T20:32:57Z")

</div>

im workin on somethin give me a few mins

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 12, 2008, 8:36pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/3 "2008-06-12T20:36:49Z")

</div>

ok try this…I think this is what you are talking about.

---

<div class="post-metadata">

**Author:** ![artriste](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@artriste](https://forum.kirupa.com/u/artriste)\
**Post date:** [June 12, 2008, 9:01pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/4 "2008-06-12T21:01:07Z")

</div>

Amazing!

I guess I was at the right place at the right moment.  
Thanks a lot.

I will post the progress so other user can follow.

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 12, 2008, 9:03pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/5 "2008-06-12T21:03:18Z")

</div>

good deal!

---

<div class="post-metadata">

**Author:** ![artriste](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@artriste](https://forum.kirupa.com/u/artriste)\
**Post date:** [June 12, 2008, 9:48pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/6 "2008-06-12T21:48:26Z")

</div>

Could you please take a look…  
Your code is just exactly what I need. Once integrated with the slideshow I have, I can find my way around and code the rest based on the trace test function you made.

I tried to integrate them together… I’m juste losing my patience.  
The original fla is attached.

This is so heading in the right direction, I don’t know what I am doing wrong.

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 12, 2008, 11:43pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/7 "2008-06-12T23:43:21Z")

</div>

[quote=artriste;2341777]Could you please take a look…  
Your code is just exactly what I need. Once integrated with the slideshow I have, I can find my way around and code the rest based on the trace test function you made.

I tried to integrate them together… I’m juste losing my patience.  
The original fla is attached.

This is so heading in the right direction, I don’t know what I am doing wrong.[/quote]

Hmm when I compile your movie I get nothing…not even errors. What exactly is the problem?

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 12, 2008, 11:53pm UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/8 "2008-06-12T23:53:53Z")

</div>

nevermind I just had some really small images in there lol…but whats the problem? You just need my code incorporated into this or what?

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 13, 2008, 12:03am UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/9 "2008-06-13T00:03:19Z")

</div>

try this one…I added a few lines of code…I commented them so you should be able to find them

---

<div class="post-metadata">

**Author:** ![artriste](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@artriste](https://forum.kirupa.com/u/artriste)\
**Post date:** [June 13, 2008, 2:10am UTC](https://forum.kirupa.com/t/actionscript-on-xml-lodaded-images/263132/10 "2008-06-13T02:10:01Z")

</div>

Thank you so much for your time.

I provided you with the original file, cause I knew both yours and my Random Slideshow code were working properly. I tried to incorporated them in all the ways I could think of. Actually, I wasn’t getting errors either, it just didn’t work. I’m glad you stopped by my post, this was exactly what I needed. I can’t wait to finish my project.

I’ll show you guys
