# Reffering to dynamic movies

**URL:** <https://forum.kirupa.com/t/reffering-to-dynamic-movies/204774>\
**Category:** Uncategorized\
**Created:** [October 23, 2006, 1:03pm UTC](https://forum.kirupa.com/t/reffering-to-dynamic-movies/204774 "2006-10-23T13:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie\_geek](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@newbie\_geek](https://forum.kirupa.com/u/newbie_geek)\
**Post date:** [October 23, 2006, 1:03pm UTC](https://forum.kirupa.com/t/reffering-to-dynamic-movies/204774/1 "2006-10-23T13:03:07Z")

</div>

Hey guys,

so i am filling the stage with movies with a keypress fuunction. Each new movie is added as a new layer:

```auto
on (keyPress "u") {
	_root.collage_holder.attachMovie("anim3", "a" + (k++), k);
}

```

and i need to unload a movie that was loaded 5 keypresses before. But i am struggling with the syntax, i have tried

```auto
on (keyPress "v") {
	_root.collage_holder.attachMovie("anim2", "a" + (k++), k, {_x:500, _y:500, _xscale:30, _yscale:30});
	_root.collage_holder._level(k-1).unloadMovie;
}

```

but seemingly to no avail. Is the syntax just wrong, or is this simply the wrong approach.
