# attachmovie..unloadmovie..reattachmovie problem!!

**URL:** <https://forum.kirupa.com/t/attachmovie-unloadmovie-reattachmovie-problem/239757>\
**Category:** Uncategorized\
**Created:** [September 25, 2007, 5:16pm UTC](https://forum.kirupa.com/t/attachmovie-unloadmovie-reattachmovie-problem/239757 "2007-09-25T17:16:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smuella](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@smuella](https://forum.kirupa.com/u/smuella)\
**Post date:** [September 25, 2007, 5:16pm UTC](https://forum.kirupa.com/t/attachmovie-unloadmovie-reattachmovie-problem/239757/1 "2007-09-25T17:16:00Z")

</div>

Hi there…

I have a function that attaches a number of instances of a movieclip from the library onto the stage using a for loop

\_root.attachMovieClip(“linkagename”,“instance”+i,i)

Then another function clears the screen by calling unloadMovieClip() in a for loop

\_root[“instance”+i].unloadMovie();

for all the instances.

If I then call the original function again it no longer works…

Does anyone know if there is an issue about (re)attaching a movie clip once it has been unloaded from the same depth?

any thoughts appreciated… I’m stumped!!
