# Loading a SWF into a Movieclip with XML

**URL:** <https://forum.kirupa.com/t/loading-a-swf-into-a-movieclip-with-xml/294701>\
**Category:** flash\
**Created:** [August 18, 2009, 7:00pm UTC](https://forum.kirupa.com/t/loading-a-swf-into-a-movieclip-with-xml/294701 "2009-08-18T19:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NielsNiels](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@NielsNiels](https://forum.kirupa.com/u/NielsNiels)\
**Post date:** [August 18, 2009, 7:00pm UTC](https://forum.kirupa.com/t/loading-a-swf-into-a-movieclip-with-xml/294701/1 "2009-08-18T19:00:00Z")

</div>

Hey guys… I hope you can help me out!

I got some kind of fotoviewer… it gets the text (under each picture there is a text which is clickable; it opens an URL) and the pictures from an external XML.

Now I’d like to change it… so when I click on the text (or picture), I want to open a .SWF into a MovieClip which is on my stage. How can I do this?

The part of ActionScript which I should change (I think!):

```auto
    img_info.albumLink.enabled = true;
    if (infostruc[current - 1].albumLink == undefined) {
        img_info.albumLink.enabled = false;
    } else {
        if (infostruc[current - 1].albumLink == "undefined") {
            img_info.albumLink.enabled = false;
        } else {
            img_info.albumLink.onPress = function() {
                getURL(infostruc[current - 1].albumLink, "_blank");
            };

```

(albumLink is the name of the text which is clickable)

The XML file contains this:

```auto
<artworkinfo>
&#8722;
<albuminfo>
<artLocation>A1.png</artLocation>
<artist>Competentie A1</artist>
<albumName>Professioneel handelen</albumName>
 <albumLink>http://www.google.nl</albumLink>
</albuminfo>
</artworkinfo>

```

Can someone help :)? I already tried some things, but I just can’t get it working… I guess I’m not thinking right!

Thx in advance!  
Niels
