# Make externally loaded images clickable

**URL:** <https://forum.kirupa.com/t/make-externally-loaded-images-clickable/279444>\
**Category:** Uncategorized\
**Created:** [January 14, 2009, 7:42pm UTC](https://forum.kirupa.com/t/make-externally-loaded-images-clickable/279444 "2009-01-14T19:42:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeffGrafix\_nl](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JeffGrafix\_nl](https://forum.kirupa.com/u/JeffGrafix_nl)\
**Post date:** [January 14, 2009, 7:42pm UTC](https://forum.kirupa.com/t/make-externally-loaded-images-clickable/279444/1 "2009-01-14T19:42:06Z")

</div>

Hi all,

I’ve created an empty movieclip (imgHolder) dynamically on my stage and through XML I’ve loaded a picture into this movieclip which works fine.  
However, if I click on the picture, nothing happens.

This is what I scripted so far…

```auto

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = function(loaded) {
    if(loaded) {
        parseXML();
        trace("the xml is loaded successfully!");
    } else {
        trace("something went wrong; error: " + this.status);
    }
}
xmlData.load("http://www.arkeacties.nl/xml/web6-mainbanners.xml");

function parseXML() {
    var themaNodes:Array = xmlData.firstChild.childNodes;
    for(i=0; i<themaNodes.length; i++) {
        var tabNodes:Array = themaNodes*.childNodes;
        
        createEmptyMovieClip("imgholder", getNextHighestDepth());
        imgholder.loadMovie(tabNodes[0].childNodes[0].attributes.beeld);
        imgholder._x = 0;
        imgholder._y = 0;
        imgholder.onPress = function() {
            trace("the image has been rolled over"); // this won't work
        }
    }
}

```

Any help would be appreciated.
