# Listeners - need help

**URL:** <https://forum.kirupa.com/t/listeners-need-help/189818>\
**Category:** flash\
**Created:** [June 6, 2006, 1:23pm UTC](https://forum.kirupa.com/t/listeners-need-help/189818 "2006-06-06T13:23:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![offshore](https://avatars.discourse-cdn.com/v4/letter/o/a88e57/32.png) [@offshore](https://forum.kirupa.com/u/offshore)\
**Post date:** [June 6, 2006, 1:23pm UTC](https://forum.kirupa.com/t/listeners-need-help/189818/1 "2006-06-06T13:23:08Z")

</div>

Hey,

I hope somebody can help me out here.  
I have a bunch of xml results. From one of the nodes I get and img url that gets loaded into a loader componet from the dataset.

There is some latency betwwen loading the images so I came up with this preloader type mc which seems to work about 50% of the time.

```auto

var listenerObject:Object = new Object();
listenerObject.change = function(evt_obj:Object) {
    var Url:String = evt_obj.target.selectedItem.Url;
       _global.productURL = Url;
};
display = new Object();
display.updateData = function(index) {
    picz.load(Url);
};
//When loading an image (Loader component)
display.progress = function(evt) {
    attachMovie("death", "death", 1, {_x:death._x=100, _y:death._y=290});
    loading = "Loading" ;
};
//When finish loading an image (Loader component)
display.complete = function(evt) {
    unloadMovie("death");
    loading = "" ;
};
picz.addEventListener("progress", display);
picz.addEventListener("complete", display);
//finish loading image
myDataGrid.addEventListener("change", listenerObject);

```

Sometimes the mc shows, then it does’nt. Seems like something may be cached, or needs to be cleared.

Any help much appreciated…  
thx
