# Disappearing Dynamic Image on Timeline

**URL:** <https://forum.kirupa.com/t/disappearing-dynamic-image-on-timeline/321052>\
**Category:** flash\
**Created:** [April 8, 2011, 7:47pm UTC](https://forum.kirupa.com/t/disappearing-dynamic-image-on-timeline/321052 "2011-04-08T19:47:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbstanley](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bigbstanley](https://forum.kirupa.com/u/bigbstanley)\
**Post date:** [April 8, 2011, 7:47pm UTC](https://forum.kirupa.com/t/disappearing-dynamic-image-on-timeline/321052/1 "2011-04-08T19:47:52Z")

</div>

I’m relatively new to AS3, but have done a lot of work with AS2, so please forgive me if I’m not using the right terminology with this…

I’ve created a button that I turned into a library class and am pulling onto my stage (same as attachMovie is AS2). This button has a timeline which does a small amount of animation.

In my AS, I am loading a thumbnail into each button class and am also assigning mouseevents of roll\_over and roll\_out to my button… this all is working so far. On roll\_over the button’s timeline plays to a point; on roll\_out, the button’s timeline plays to the end and then goes back to the first frame… BUT now my image is gone. Why??? Thanx in advance! Here is my AS:

```auto

for(var c:int=0; c<arrTours.length; c++){
        
        var clip = new mc_clip(); // my button class
        clip.x = (c % 3) * (clip.width + horzPadding);
        clip.y = Math.floor(c/3) * (clip.height + vertPadding);
        
        var thumbLoader = new Loader();
        var thumbHolder:Sprite = new Sprite();
        thumbHolder.x = 9;
        thumbHolder.y = 8;
        thumbHolder.addChild(thumbLoader);
        thumbLoader.load(new URLRequest(arrTours[c].thumb));
        clip.addChild(thumbHolder);
        
        clip.ID = c;
        clip.buttonMode = true;
        clip.addEventListener(MouseEvent.ROLL_OVER, clipOver);
        clip.addEventListener(MouseEvent.ROLL_OUT, clipOut);
        clip.addEventListener(MouseEvent.CLICK, clipHit);
        
        footer_mc.thumbHolder_mc.addChild(clip);
}

function clipOver(e:MouseEvent){
    e.target.gotoAndPlay('in');
}
function clipOut(e:MouseEvent){
    e.target.gotoAndPlay('out');
}
function clipHit(e:MouseEvent){
    trace(e.target.ID);
}

```
