# Newbie need some help

**URL:** https://forum.kirupa.com/t/newbie-need-some-help/21855
**Category:** flash
**Created:** [May 27, 2003, 11:56am UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855 "2003-05-27T11:56:48Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Chop](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@Chop](https://forum.kirupa.com/u/Chop)
#### Post date: [May 27, 2003, 11:56am UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/1 "2003-05-27T11:56:48Z")

</div>

I have a movie and when I click on the button it loads a new movie .swf onto the main timeline on level 1 - that’s good, my problem is…

I want to click on the button of the movie just loaded, unload the movie (thats fine), and then make it go to a frame number or lable of the main time line and play on load …

Is this possible…

Thanks Andy

---

<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: [May 27, 2003, 11:58am UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/2 "2003-05-27T11:58:26Z")

</div>

This really belongs in the Flash MX Forum. I’m going to move it over…

---

<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: [May 27, 2003, 11:59am UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/3 "2003-05-27T11:59:04Z")

</div>

Thanks Sorry…

---

<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: [May 27, 2003, 12:02pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/4 "2003-05-27T12:02:43Z")

</div>

No probs. 🙂 You’re more likely to get an asnwer quickly if the post is in this area. 🙂

---

<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: [May 27, 2003, 12:06pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/5 "2003-05-27T12:06:29Z")

</div>

Thanks Kit… Its all very new - will people help me out on this one, I was play around last night for hours trying to get it to work…

Cheers Andy

---

<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: [May 27, 2003, 12:34pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/6 "2003-05-27T12:34:50Z")

</div>

I’m sure people will answer. 🙂

I’ll have a look at it myself, in fact. Quick query though. Which movie are you unloading on the button click?

---

<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: [May 27, 2003, 12:48pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/7 "2003-05-27T12:48:41Z")

</div>

Kit

Its the second one … not sure if I am explaining it very well

I have one the main timeline runing which has a button.

I click on it which loads a movie .swf file that movie runs and also has a button … when you click the button of this loaded movie I want it to unload the movie from the level which is one and move to a frame number 65 and play from there…

does this help… Cheers Andy

---

<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: [May 27, 2003, 1:05pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/8 "2003-05-27T13:05:17Z")

</div>

OK, with you now. 🙂

So when you unload that second movie, whereabouts does the original return to? The same place you left off?

If that’s the case, then you could use a flag of some kind, to determine whether or not the second movie has been unloaded, and if that’s true, gotoAndPlay frame 65…

---

<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: [May 27, 2003, 1:14pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/9 "2003-05-27T13:14:24Z")

</div>

Kit … yes the same place is the location it returns to…

Ok … what is a flag … could you show me some code for this

Cheers Andy

---

<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: [May 27, 2003, 1:22pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/10 "2003-05-27T13:22:30Z")

</div>

Flag… Just another term for a variable. 🙂

This one, you set it in your original movie to be 0 to start with, so like: [AS]movieflag = 0;[/AS] Now, the code for the button should have your loadMovie statement inside, as well as this: [AS]on (release) {  
movieflag = 1;  
loadMovieNum(“yourMovie”, 1);  
} [/AS] Then the new movie will load, play and close. When it closes and returns to the original, you’ll need to test for the contents of the movieflag. So Just add a conditional if statement to check it inside and onEnterFrame() event handler.

---

<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: [May 27, 2003, 1:35pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/11 "2003-05-27T13:35:45Z")

</div>

Kit … Ok

I will test it out this evening see if I can get it to work - but thanks most of all for your time and help on this

your a star… Cheers Andy

---

<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: [May 27, 2003, 1:36pm UTC](https://forum.kirupa.com/t/newbie-need-some-help/21855/12 "2003-05-27T13:36:37Z")

</div>

Eh, no probs. That’s what we’re all here for. :beam:
