# How to use dynamically loaded data?

**URL:** <https://forum.kirupa.com/t/how-to-use-dynamically-loaded-data/84358>\
**Category:** Uncategorized\
**Created:** [March 26, 2005, 8:44pm UTC](https://forum.kirupa.com/t/how-to-use-dynamically-loaded-data/84358 "2005-03-26T20:44:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prada](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@prada](https://forum.kirupa.com/u/prada)\
**Post date:** [March 26, 2005, 8:44pm UTC](https://forum.kirupa.com/t/how-to-use-dynamically-loaded-data/84358/1 "2005-03-26T20:44:48Z")

</div>

Hi there  
am really stuck and need any help at all. Am sooo frustrated. Right, am creating an image gallery and loading the images dynamically from a text file into empty movie clips which i am duplicating as needed. Thats ok so far…here’s the code…

```auto

if (succes) {
        var imageNum = this.imageNum;
        trace("imageNum="+imageNum);
        offset = 0;
        for (i=1; i<=imageNum; i++) {
            duplicateMovieClip("holder_mc", "holder_mc"+i, i);
            setProperty("holder_mc"+i, _x, offset);
            trace("clip just created is "+"holder_mc"+i);
            _root.gallery_mc["holder_mc"+i].loadMovie(this["Image"+i]);
            **_root.gallery_mc["holder_mc"+i].onRelease = function(){
                trace("hello");
                //code here to jump down timeline when an image clicked
                }**
            offset = offset+250;
          
        }
        
    } 
    

    else {
        trace("Error loading data");
    }

```

The code high-lighted in red is what not is working! I need to be able to click on any of the images that have been loaded into the duplicated holder\_mc movieclips…but i just can’t get it to work! Anybody have any idea at all what i have to do??  
thanks so much in advance
