PDA

View Full Version : Load Movie to specified frame?


apertureboy
10-06-2002, 06:24 AM
Hello,

I did a search of the forum for loadmovienum and some addressed similar problems I am having but nothing seems to work for me. Here's me problem ----

2 scenes with "back" and "next" buttons throughout. The last "next" button loads scene 2 using loadmovienum. Now in scene 2 you can go forward, but if you choose to go back you will actually be back in scene 1. Using the load movienum takes me back to scene 1, but loads at the beginning of scene 1, and I would like to go to a specified scene (scene 600). Is there anyway around this?

Thanks fer yer help,

This is what i've tried thus far: Am I close???


on (release) {

loadMovieNum ("LOD_1_sending information.swf", 0);

gotoAndPlay ("slide-5");

}

AND

on (release) {

loadMovieNum("LOD_1_sending information.swf",0);

_level1.gotoAndPlay("slide-5");

}

AND

on (release) {

loadMovieNum ("LOD_1_sending information.swf", 0);

_level1.goToAndStop("slide-5");

}

AND

on (release) {

gotoAndPlay ("sending information", "slide-5");
}

Billy T
10-06-2002, 09:05 AM
you need to set a variable with your buttons as well as load the movie

eg

jumpAhead=true;

and then on the first frame of the movie you are loading in have something like

if(jumpAhead==true){
gotoAndPlay("somewhere");
}

obviously you will need to provide the correct path to the variable when checking it

this wont work if loading the movie into level0 because all variables will be cleared

cheers

apertureboy
10-06-2002, 07:30 PM
Hey Mr. T,

Thanks for the advice - this is what i've tried thus far.

well, I have 3 scenes and am trying to go back and fourth between scenes 2 and 3, so the issue of level0 shouldn't matter right?

anyway, I put a variable like you said jumpAhead, on the back button but came up with an error :

Statement must appear within on handler
jumpAhead=true;

Then I used a frame action instead and no error.

I then put :

if(jumpAhead==true){

gotoAndPlay("slide-5");

}

on the first frame of scene 2 as we are loading scene 2 into 3.

Nothing happened. This is the other code on the back button scene 3.

on (release) {
loadMovieNum ("LOD_1_sending information.swf", 0);
_root.goToAndStop("slide-5");
}

Any thoughts on what else I am missing or doing wrong - I appreciate the help.

Apertureboy

Billy T
10-06-2002, 11:12 PM
I think you are confused about what a scene is and how the loadMovie action works

this should help - http://www.tableau.com.au/tutorials/load_movie_tute/index.html

post back if it doesn't

cheers

apertureboy
10-07-2002, 05:28 AM
Hi,

I tried your tutorial - thanks. But I've downloaded the source files 3 times and each time they will not open in Flash "unexpected file format" appears. Could be my machine though.

I want to clarify something - I am using "loadMovieNum" with a gotoandPlay - is this the same as LoadMovie?

The reason I chose to use this is that a simple gotoandPlay scene# or next scene simply does nothing - The only thing that will advance me back and fourth between scenes is the loadmovienum. There are many odd things happening in this .Fla. - in scene 3, to advance each button, on the gotoandplay, I reference scene 2 - or they won't work.

Thanks again,

Apertureboy.

I'll try and post the fla...

Billy T
10-07-2002, 06:01 AM
the source file for the tute is mx - are you using v5?

loadMovieNum is for loading an external movie into a level

loadMovie is for loading an external movie into a target MC

a scene is used to break up "a single" fla but can cause problems with actionscripting

so are you really using scenes or is your site broken up into single scene flas?

apertureboy
10-07-2002, 06:22 AM
Hello again,

I am using v5 - hence the problem. I guess I should have clarified that - I have 1 .fla and have simply added scenes using the scene panel. The reason I did this is because I have so much content I have run out of frames. Is this the way you would do it? If so, what's the best way to connect scenes with one .fla - loadmovieNum or simply gotoandPlay?

Apertureboy

Billy T
10-07-2002, 06:25 AM
gotoAndPlay

use frame labels as well

cheers

apertureboy
10-07-2002, 06:35 AM
Hey,

And the problems continue.... the only thing that will move me from frame 2 - 3 - 4 is LoadMovieNum. GotoandPlay at the end of a scene just rewinds the same scene again...

I dunno, a bug...my computer hates me. If I must use LoadMovieNum, can I specify which frame to move to?

Thanka again.

Apertureboy

Billy T
10-07-2002, 06:41 AM
forget about loadMovieNum - its not designed to do what you want and I have no idea how it was working at all

put the frame label "startScene2" in the first frame of scene 2

then put

gotoAndPlay ("startScene2"); in the last frame of scene 1 or whenever you want it to jump

if you dont put anything then flash will just play from scene to scene

cheers

apertureboy
10-07-2002, 06:58 AM
Hi,

Nothing happens, just replays the same scene...I put an on(release) as well and a frame label first frame scene 2

on (release) {
gotoAndPlay ("scene_2", "startScene2");
}


This just won't work...

Apertureboy

Billy T
10-07-2002, 07:23 AM
try

on (release) {
gotoAndPlay ("startScene2");
}

apertureboy
10-07-2002, 09:28 PM
Hello again,

Still having troubles. I suspect that your a busy man, but if you have the tinme to take a peek at the .fla, email me at robert@balanceimages and I'll give you the necessary info to download the fla.

Thanks for all your help,

Apertureboy

Billy T
10-08-2002, 12:34 AM
sure just post a link on here

cheers

apertureboy
10-08-2002, 12:45 AM
Hey,

The fla is too large - 50 mb! Its on my server - email and I'll give ya the details

Cheers

Billy T
10-08-2002, 12:52 AM
no way I'm gonna download a 50MB fla

strip it down to just the actions and whatever else is needed and I'll take a look

cheers