If your image holder MC only has images in it, you can do this, BEFORE
you load the next image:

//remove all loaded images from "img"
while(img.numChildren > 0){             
     var killIMG = img.getChildAt(0);
     img.removeChild(killIMG);
     killIMG = null;
}

I'm sure someone else will suggest a superior method but it does the trick ;)

.m

On Tue, Mar 24, 2009 at 5:22 PM,  <zu...@zadesigns.com> wrote:
>
>
> http://rafb.net/p/NZxD3554.html [1]
>
> my code is pasted above for easy reading.
>
> In AS3 I am trying to remove the previous image. In AS2 I could type
> my_mc.unloadMovie(); but in AS3 I ned to refrence the child? I am not 100%
> sure as to what to do. I tried to write a way for it to find the previous
> image but it didn't work out so well...
>
> Line 80 and 90 were a attempt but they just don't seem correct... I'd
> rather remove the image at line 103 right before I load the new image, but
> was unsuccessful. any ideas? Thanks!
>
> Links:
> ------
> [1] http://rafb.net/p/NZxD3554.html
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to