# Using prevFrame for unloading movie?

**URL:** https://forum.kirupa.com/t/using-prevframe-for-unloading-movie/170396
**Category:** Uncategorized
**Created:** [November 25, 2005, 1:58pm UTC](https://forum.kirupa.com/t/using-prevframe-for-unloading-movie/170396 "2005-11-25T13:58:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![s4ul3](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@s4ul3](https://forum.kirupa.com/u/s4ul3)
#### Post date: [November 25, 2005, 1:58pm UTC](https://forum.kirupa.com/t/using-prevframe-for-unloading-movie/170396/1 "2005-11-25T13:58:43Z")

</div>

Hey!

I read a tutorial about complex buttons with prevFrame function on this site. I was wondering how I could use this function to unload my movie. I have a movie (swf) that loads itself into another movie. Now what I would like form this movie to do is to kindly unload itself the way it loaded in. This should happen once a button on the main (root) timeline would be pressed. I already have all the buttons set up, but I have no idea how to write a code that would send my movie backwards.

I is simply put a this.onEnterFrame = prevFrame; on the last frame, but now there is a problem. I have to somehow stop this movie until a button is pressed. And only when a button is pressed it should execute prevFrame.

huh…

Thx for your time!  
Dane
