# How to make a button that does two things?

**URL:** https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892
**Category:** flash
**Created:** [November 30, 2002, 3:44pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892 "2002-11-30T15:44:40Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Hex](https://avatars.discourse-cdn.com/v4/letter/h/c2a13f/32.png) [@Hex](https://forum.kirupa.com/u/Hex)
#### Post date: [November 30, 2002, 3:44pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/1 "2002-11-30T15:44:40Z")

</div>

I’m trying to make a button that first tells a swf file externaly loaded into the flash page to go to and play at frame 50 and then when that is done load another external swf in the same box as the previous one was in.

How can I do it?

---

<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 30, 2002, 3:54pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/2 "2002-11-30T15:54:13Z")

</div>

on(release) {  
mymovie.gotoAndPlay(50);  
mymovie2.loadMovie(“moviename.swf”, 0);  
}

or instead of  
mymovie2.loadMovie(“moviename.swf”, 0);  
you could use  
loadMovie(“moviename.swf”, mymovie2);  
replace mymovie and mymovie2 with the movieclips you want to play and to load another movie into

---

<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 30, 2002, 3:56pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/3 "2002-11-30T15:56:51Z")

</div>

does this make the movie clip that is already loaded finish itself before it loads up the new one?

---

<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 30, 2002, 3:58pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/4 "2002-11-30T15:58:46Z")

</div>

no man, the current movie doesn’t have to be finished loading to load another movie. i could be wrong about this, but im pretty sure im not. it just depends also on how you decide to load the movie and where.

---

<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 30, 2002, 4:02pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/5 "2002-11-30T16:02:17Z")

</div>

if you want the first movie to finish …

why don’t you load the other movie from the last frame of the first movie? that would be easier

---

<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 30, 2002, 4:03pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/6 "2002-11-30T16:03:38Z")

</div>

well the actions are executed when the button is pressed… and when I can see the button and click on it then the next movie will be loaded if I press the button

---

<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 30, 2002, 4:21pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/7 "2002-11-30T16:21:17Z")

</div>

ok, perhaps my explination wasnt good enough… or I’m completely misunderstanding everyone :P=)

I have a menu with 6 options  
Then I have a thumbnail part, externaly loaded.  
Then I have a full image viewer part, externaly loaded.

What I want to happen is that when I click on a menu first it loads up a movie clip in the thumbnail part and stops at lets say frame 50, easy enough.

But when I click on another menu option it finishes the movie clip currently loaded in the thumbnail part and then when its done it loads up another thumbnail part in the same box.

The only way I have figured out how to do it is when I click on a menu option it tells the thumbnail clip to go to and play frame 50 and at the end of that movie clip is a load movie part that starts to load up the next movie. The button in the menu would then have to tell the thumb clip to play and to tell it what .swf file it should load when its finished playing. I have no idea how to do this.

---

<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 2, 2002, 11:54am UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/8 "2002-12-02T11:54:19Z")

</div>

^bump

---

<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 2, 2002, 12:05pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/9 "2002-12-02T12:05:31Z")

</div>

this probably has somethin to do with what i’m trying to do but i’m confused :-\

---

<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 3, 2002, 9:14pm UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/10 "2002-12-03T21:14:49Z")

</div>

Well, since your trying to make a menu, Try using Sorcerer method. Always search in Best of [Kirupa.com](http://Kirupa.com) Forum before posting, You may find ur question answered there. 🙂

[http://www.kirupaforum.com/showthread.php?s=&threadid=8962](http://www.kirupaforum.com/showthread.php?s=&threadid=8962)

---

<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 4, 2002, 12:06am UTC](https://forum.kirupa.com/t/how-to-make-a-button-that-does-two-things/8892/11 "2002-12-04T00:06:39Z")

</div>

I’m not sure if I understand you right but you may check out this post [http://www.kirupaforum.com/showthread.php?s=&threadid=9686](http://www.kirupaforum.com/showthread.php?s=&threadid=9686) electrongeek was asking how to play a transition out animation and when that was finished play the transition in animation of the next image. Take a look at the fla and see if that’s the kind of thing you are looking for.
