# Load movie and go to a specific frame

**URL:** https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971
**Category:** Uncategorized
**Created:** [July 23, 2004, 12:22am UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971 "2004-07-23T00:22:51Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![lrius1](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@lrius1](https://forum.kirupa.com/u/lrius1)
#### Post date: [July 23, 2004, 12:22am UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/1 "2004-07-23T00:22:51Z")

</div>

I’m newbie and stuck.

I’m trying to build a full flash site. I have movieA (main movie) that loads the rest of the movies (movieB, movieC, movieD…). MovieA is the menu. When I want to “come back” from this movies to the main movie, I need to move the header to a specific frame of movieA, diferent depending on the movie I have previously loaded:

**movieA** : loadmovie (movieB, movieC, movieD…)

from movieB: loadmovie movie A (frame2)  
from movieC: loadmovie movie A (frame3)  
from movieD: loadmovie movie A (frame4)

Is it possible or when you load a movie you can only start playing in frame 1? Any hint? Thank you

---

<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: [July 23, 2004, 2:34pm UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/2 "2004-07-23T14:34:52Z")

</div>

> [@lrius1](#):
>
> I’m newbie and stuck.
> 
> I’m trying to build a full flash site. I have movieA (main movie) that loads the rest of the movies (movieB, movieC, movieD…). MovieA is the menu. When I want to “come back” from this movies to the main movie, I need to move the header to a specific frame of movieA, diferent depending on the movie I have previously loaded:
> 
> **movieA** : loadmovie (movieB, movieC, movieD…)
> 
> from movieB: loadmovie movie A (frame2)  
> from movieC: loadmovie movie A (frame3)  
> from movieD: loadmovie movie A (frame4)
> 
> Is it possible or when you load a movie you can only start playing in frame 1? Any hint? Thank you

No, you can start at any frame you want but you have to make sure it is fully loaded first by comparing getBytesLoaded() and getBytesTotal in a loop.  
I`m struggling a little to understand what you are trying to do, is your menu ever present and you just want i to go to different frames when movies are loaded?

---

<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: [July 24, 2004, 9:56am UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/3 "2004-07-24T09:56:33Z")

</div>

Thanks for your reply. I’ll try to explain my problem better:

I have a menu (“menu.swf”) with a timeline with 20 frames. From this movie, I load different movies (“first.swf”, “second.swf”, “third.swf”…) with loadMovieNum (so the menu is not always present).

My problems comes when I want to “come back” to the menu. With loadMovieNum(“menu.swf”,0) I always start at frame 1 of “menu.swf” and I need to go to a specific frame, depending if I have opened “first.swf” (I want to go to frame 2 of “menu.swf”), “second.swf” (I want to go to frame 3 of “menu.swf”) or “third.swf” (I want to go to frame 3 of “menu.swf”).

I suspect the solution i easy (variables?), but I can´t figure it out. What are the exact commands?

I hope it’s clearer now. Thanks.

Lluís Rius.

---

<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: [July 24, 2004, 12:36pm UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/4 "2004-07-24T12:36:32Z")

</div>

> [@lrius1](#):
>
> Thanks for your reply. I’ll try to explain my problem better:
> 
> I have a menu (“menu.swf”) with a timeline with 20 frames. From this movie, I load different movies (“first.swf”, “second.swf”, “third.swf”…) with loadMovieNum (so the menu is not always present).
> 
> My problems comes when I want to “come back” to the menu. With loadMovieNum(“menu.swf”,0) I always start at frame 1 of “menu.swf” and I need to go to a specific frame, depending if I have opened “first.swf” (I want to go to frame 2 of “menu.swf”), “second.swf” (I want to go to frame 3 of “menu.swf”) or “third.swf” (I want to go to frame 3 of “menu.swf”).
> 
> I suspect the solution i easy (variables?), but I can´t figure it out. What are the exact commands?
> 
> I hope it’s clearer now. Thanks.
> 
> Lluís Rius.

I`m guessing that you are loading everything into \_level0 and just replacing the previous movie.  
This is not such a good way of doing things as you have very little control over what is happening. Much better to load the movies into different levels and then use \_visible or \_alpha(transition maybe) to see each level.  
Heres a very simple file which may help you understand what i mean.

---

<div class="post-metadata">

### Author: ![lrius1](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@lrius1](https://forum.kirupa.com/u/lrius1)
#### Post date: [July 26, 2004, 9:47am UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/5 "2004-07-26T09:47:48Z")

</div>

Thank you Stringy. It works…  
But in my case your solution didn`t solve the problem because some swf only work if they are loaded in \_level0 (maybe “\_root” problems) and then the other movies are unloaded. I try to load it again (in level 5) and make it invisible. Is there a way to loadNum a movie in a specific level (ie.5) and inmediately make it invisible? I must be stupid but I haven’t been able to do such an easy thing.

---

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [July 26, 2004, 3:53pm UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/6 "2004-07-26T15:53:45Z")

</div>

> [@lrius1](#):
>
> Thank you Stringy. It works…  
> But in my case your solution didn`t solve the problem because some swf only work if they are loaded in \_level0 (maybe “\_root” problems) and then the other movies are unloaded. I try to load it again (in level 5) and make it invisible. Is there a way to loadNum a movie in a specific level (ie.5) and inmediately make it invisible? I must be stupid but I haven’t been able to do such an easy thing.

type this.\_visible = false; in the first frame of the movie you are loading.

---

<div class="post-metadata">

### Author: ![lrius1](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@lrius1](https://forum.kirupa.com/u/lrius1)
#### Post date: [July 26, 2004, 10:35pm UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/7 "2004-07-26T22:35:43Z")

</div>

Ok, but then I can’ control this movie. I imagine that this script would work:

loadMovieNum(“menu.swf”, 5);  
\_level5.\_visible = true;

but it doesn´t. I can see the “menu.swf” and can’t keep it hidden.  
Sorry,but this problem drives me crazy.

lluís

---

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [July 26, 2004, 11:13pm UTC](https://forum.kirupa.com/t/load-movie-and-go-to-a-specific-frame/116971/8 "2004-07-26T23:13:18Z")

</div>

> [@lrius1](#):
>
> Ok, but then I can’ control this movie. I imagine that this script would work:
> 
> loadMovieNum(“menu.swf”, 5);  
> \_level5.\_visible = true;
> 
> but it doesn´t. I can see the “menu.swf” and can’t keep it hidden.  
> Sorry,but this problem drives me crazy.
> 
> lluís

you have to check it has loaded
