# Loadmovie

**URL:** https://forum.kirupa.com/t/loadmovie/10393
**Category:** Uncategorized
**Created:** [December 31, 2002, 3:30am UTC](https://forum.kirupa.com/t/loadmovie/10393 "2002-12-31T03:30:02Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![skidpanda](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@skidpanda](https://forum.kirupa.com/u/skidpanda)
#### Post date: [December 31, 2002, 3:30am UTC](https://forum.kirupa.com/t/loadmovie/10393/1 "2002-12-31T03:30:02Z")

</div>

Hello there, i realise there are already similar questions being asked on this board but i think mines a bit different… i think

I have a menu with 6 buttons. When i click a button it loads a movie into a holder MC. But when the user picks another menu option i dont want the new SWF to load instantly, i want the existing loaded SWF to play a loadout sequence then disapear, then have the new movie the user clicked on load.

It’s a bit complicated to explain but I hope you get the gist.

Thankyou for any help, u kirupa lot havent let me down yet

Skid :beam: 🙂

---

<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: [December 31, 2002, 3:40am UTC](https://forum.kirupa.com/t/loadmovie/10393/2 "2002-12-31T03:40:58Z")

</div>

i needed a similar thing for my site…  
for the button, just get it to play the external movie “to play a loadout sequence then disapear”  
then on the last frame you can have a gotoAndPlay() to a frame in the main movie where the new movie will be loaded… did i make any sense??

try using moveClip.clear(); loadMovie(section, this); on that frame where section would be a variable with the path to that external file…

if you were using levels, you could go as simple as \_level#.clear()

cheers  
:A+: ![](http://www.flashdevils.com/~ahmed/hmed.gif)

---

<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: [December 31, 2002, 5:09am UTC](https://forum.kirupa.com/t/loadmovie/10393/3 "2002-12-31T05:09:35Z")

</div>

Here’s what I did for my most recent site I worked on.

In the middle of the stage, I had a movieclip named “swipe”. Inside the movieclip swipe, first frame was a stop command. Second frame I named the frame “close”, and had my animation of the doors closing. That animation went to frame 40. On frame 40 and 41 The doors remain closed and i have a “loading” mc that keeps looping. on frame 40 I have the actions :

```php

if (_root.loaded == "yes") {
	gotoAndPlay(42);
} else {
	gotoAndPlay(40);
}

```

Frame 42 is named “open” and then the animation of the doors opening happens. Once it reaches the end of the animation for the opening of the doors the movie below it plays like it should.

Now to know when that movie is loaded, you see there is something in my “swipe” mc that looks to see the value of a variable.

```php

_root.loaded

```

In the first frame of my loading swf’s I have :

```php

_root.loaded = "yes";

```

Once the movie is loaded into its placeholder, it recognizes that line of code, my doors open, and my movie underneath the doors is fully loaded and ready to be seen!

I just added the

```php

_root.loaded = "yes";

```

to the first of each frame of .swf’s that I am loading.

Hope that helped:beam:

---

<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: [December 31, 2002, 6:22pm UTC](https://forum.kirupa.com/t/loadmovie/10393/4 "2002-12-31T18:22:03Z")

</div>

Wow thanks for the replies guys, I’m finding them a little hard to understand though, i kinda get what your meaning. I’ll sit down and try to figure it out and get your idea’s into my head.

Anyone else got any good solutions for this problem?

Happy new year everyone by the way !! woohoOOOO!!!

Cheers, Skid \<:} (-:

---

<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: [December 31, 2002, 11:30pm UTC](https://forum.kirupa.com/t/loadmovie/10393/5 "2002-12-31T23:30:26Z")

</div>

I’ve attached a file, could someone have a look at it and see if they can help me out 😏 I know its asking alot…

there are 3 fla’s:

mainmovie.swf  
external.swf  
external2.swf

The mainmovie loads the externals into itself when buttons are pressed. But when externa1.swf is loaded, then external2.swf button is pressed to load, i want external 1 to unload first, not just disappear then external2 appear.

Have a look and you’ll see what i mean! 🙂

Thanks!

Skid :nerd:

---

<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: [January 1, 2003, 1:07am UTC](https://forum.kirupa.com/t/loadmovie/10393/6 "2003-01-01T01:07:32Z")

</div>

it depends on how in depth you are with your loaded clips - what kind of scripting youd want to put in there and how exactly they operate

given the example that they are set up something like:

(load) [fadein…][stop][fadeout…] (unload)

(as external2 was) where stop is the paused frame you spend your time “viewing” the loaded swf, then you can do something like this for your buttons:

```auto

on (release) {
	holder.play();
	holder.onEnterFrame = function(){
		if (this._currentframe == this._totalframes){
			this.loadMovie("external.swf");
			delete this.onEnterFrame;
		}
	}
}

```
