# How would I write this function?

**URL:** <https://forum.kirupa.com/t/how-would-i-write-this-function/210182>\
**Category:** flash\
**Created:** [December 15, 2006, 9:42pm UTC](https://forum.kirupa.com/t/how-would-i-write-this-function/210182 "2006-12-15T21:42:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skellykitten](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skellykitten](https://forum.kirupa.com/u/skellykitten)\
**Post date:** [December 15, 2006, 9:42pm UTC](https://forum.kirupa.com/t/how-would-i-write-this-function/210182/1 "2006-12-15T21:42:17Z")

</div>

I created a variable with the external movies and jpgs that I’m loading and it isn’t giving me an error, so I’m guessing this is working

```auto

var exMovies:Array = new Array("sketchPad.swf","lineSht4Res.jpg","SFT_gal.swf","lollieGallery.swf","SorSis_Book.swf","solodress_gal.swf");

```

but now I’d like to create a function that unloads any of those movies/jpgs when I press certain buttons, and I’m lost on how to do it, and since I don’t know if that is even possible, I can’t figure out if I’m just writing the function wrong, or if it won’t work no matter what I write.Nothing I’ve tried so far is working.  
Does anyone have any idea how to do this or am I just wasting time trying it?  
Thanks 🙂
