# Reffering to dynamic movies

**URL:** <https://forum.kirupa.com/t/reffering-to-dynamic-movies/204773>\
**Category:** Uncategorized\
**Created:** [October 23, 2006, 1:02pm UTC](https://forum.kirupa.com/t/reffering-to-dynamic-movies/204773 "2006-10-23T13:02:57Z")\
**Posts on this page:** 4\
**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:02pm UTC](https://forum.kirupa.com/t/reffering-to-dynamic-movies/204773/1 "2006-10-23T13:02:57Z")

</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.

---

<div class="post-metadata">

**Author:** ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)\
**Post date:** [October 23, 2006, 4:11pm UTC](https://forum.kirupa.com/t/reffering-to-dynamic-movies/204773/2 "2006-10-23T16:11:06Z")

</div>

maybe ??

```auto
_root.collage_holder["a"+Number(k-5)].removeMovieClip();

```

---

<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 24, 2006, 1:25am UTC](https://forum.kirupa.com/t/reffering-to-dynamic-movies/204773/3 "2006-10-24T01:25:28Z")

</div>

Actually deril answered it pretty handily here:

> **[Unloading dynamic movie...](https://www.kirupa.com/forum/showthread.php?t=238059)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

**Author:** ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)\
**Post date:** [October 24, 2006, 5:28am UTC](https://forum.kirupa.com/t/reffering-to-dynamic-movies/204773/4 "2006-10-24T05:28:10Z")

</div>

[QUOTE=newbie\_geek;1983995]Actually deril answered it pretty handily here:

> **[Unloading dynamic movie...](https://www.kirupa.com/forum/showthread.php?t=238059%5B/QUOTE%5D)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

Looks like i wasted my time then!!
