# Unload problem :\`(

**URL:** https://forum.kirupa.com/t/unload-problem/7721
**Category:** Uncategorized
**Created:** [November 6, 2002, 12:03pm UTC](https://forum.kirupa.com/t/unload-problem/7721 "2002-11-06T12:03:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![onno](https://avatars.discourse-cdn.com/v4/letter/o/dec6dc/32.png) [@onno](https://forum.kirupa.com/u/onno)
#### Post date: [November 6, 2002, 12:03pm UTC](https://forum.kirupa.com/t/unload-problem/7721/1 "2002-11-06T12:03:25Z")

</div>

Hi, how can i make a animation between the unloadMovie and the loadMovie.

hmm something like this  
[http://www.pixelskin.com/pixelskin.asp](http://www.pixelskin.com/pixelskin.asp)

when i click on the menu bar and load a new serction there is a animation

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 12:08pm UTC](https://forum.kirupa.com/t/unload-problem/7721/2 "2002-11-06T12:08:27Z")

</div>

Hey onno,

Well, i think when u press on the button, there should be other commands with the unloadmovie! something like:

```php
button.onRelease = function() {
gotoAndPlay("Animationb4unloading");
unloadMovieNum(level);
}

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 12:28pm UTC](https://forum.kirupa.com/t/unload-problem/7721/3 "2002-11-06T12:28:56Z")

</div>

for this gotoAndPlay(“Animationb4unloading”);

i must make a new movie or in the same scene, but on ne frame?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 12:32pm UTC](https://forum.kirupa.com/t/unload-problem/7721/4 "2002-11-06T12:32:18Z")

</div>

> new movie or in the same scene

Well, as u like, just try achieving that effect :)!

yours,  
h88

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 12:45pm UTC](https://forum.kirupa.com/t/unload-problem/7721/5 "2002-11-06T12:45:42Z")

</div>

Thanks 🙂

I’m going to try now, if all goes well i’ll let you know :cowboy:

Thanks again

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 12:56pm UTC](https://forum.kirupa.com/t/unload-problem/7721/6 "2002-11-06T12:56:34Z")

</div>

i think i did something wrong, when u click the button, u just go to a specific animation when the button is pressed!

```php
button.onRelease = function(){
gotoAndPlay("animation");
}

```

and when it reaches the last frame of “animation”:

```php
unloadMovieNum(level);

```

hope this helps!

h88

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 1:00pm UTC](https://forum.kirupa.com/t/unload-problem/7721/7 "2002-11-06T13:00:23Z")

</div>

this is a better way:

```php
button.onRelease = function(){
	movieclip.gotoAndPlay("animation");
	if (movieclip._currentframe == 5) { //last frame number of ur animation
		unloadMovieNum(level);
	}
}

```

yours,  
h88

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 2:42pm UTC](https://forum.kirupa.com/t/unload-problem/7721/8 "2002-11-06T14:42:36Z")

</div>

sorry man, but i didnt understant the last code…

think that i’m new on that 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 4:20pm UTC](https://forum.kirupa.com/t/unload-problem/7721/9 "2002-11-06T16:20:21Z")

</div>

Thats some good stuff man. I did it the hgard way with a lot of variables and if statments. Do u think u could whip up a working FLA for a view. I would like to see this code implmented so as to improve mine. I’m about to redesign my content sections and I should od it right this time:)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 5:27pm UTC](https://forum.kirupa.com/t/unload-problem/7721/10 "2002-11-06T17:27:15Z")

</div>

> \*Originally posted by sintax321 \*  
> \*\*Thats some good stuff man. I did it the hgard way with a lot of variables and if statments. Do u think u could whip up a working FLA for a view. I would like to see this code implmented so as to improve mine. I’m about to redesign my content sections and I should od it right this time:) \*\*

hehe, u should think b4 coding, test and experiment!  
i am an actionscripter since … this is unimportant to though. but u just try to simplify your code as simple as possible, not using for ie prototypes when it could be used as …

thats all,  
hope to hear from u soon!

yours,  
h88

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 5:32pm UTC](https://forum.kirupa.com/t/unload-problem/7721/11 "2002-11-06T17:32:26Z")

</div>

Ya i nkow i should think before. My site was a rush job done in one weekend. I just needed some code that worked so I could get it online. Now I’m going back to change it. I want to make the code simpler.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 5:36pm UTC](https://forum.kirupa.com/t/unload-problem/7721/12 "2002-11-06T17:36:51Z")

</div>

> \*Originally posted by onno \*  
> \*\*sorry man, but i didnt understant the last code…

think that i’m new on that 😛 \*\*

okay for u onno:

```php
button.onRelease = function(){ // define onRelease Callback event
    movieclip.gotoAndPlay("animation"); //it goes to the closing animation of your movieclip
    if (movieclip._currentframe == 5) { //last frame number of ur animation and it would say if the movieclip current frame is the last frame u sepcifiy, then unload the movie!
        unloadMovieNum(level);
    }
}

```

well am sure there will be some errors, but u just try to debug ur code by your own, the code is very simple, and i alredy defined whats going on!

yours,  
h88

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 6, 2002, 5:55pm UTC](https://forum.kirupa.com/t/unload-problem/7721/13 "2002-11-06T17:55:24Z")

</div>

Nice stuff. I’ll try this tonight:)
