Groups | Blog | Home
all groups > flash (macromedia) > september 2004 >

flash (macromedia) : loadMovieNum to a specific scene.


moamoa
9/14/2004 9:51:30 PM
Hi All
Perhaps someone can tell me: How can I go from one movie to another movie at a
specific scene and frame.
When I use LoadMovienum, it takes me to the right movie, but at Scene 1,
say, I would like it to go to scene 7.
How can I do this.
This is the syntax I used:
-------------------------------------------------------------------
on (release) {
loadMovieNum("3STEPS_d5.swf", 0);
}
------------------------------------------------------------------
Thanks, i appreciate your help!
Norby



oe
9/15/2004 12:38:51 PM
I stopped using scenes for they tend to make problems, so I use just
frames in my example, but i'm sure you'll figure it out for yourself.

If you have another movie loaded in let's say level 10 you can control
it wit the point syntax like the following example:

_level10.gotoAndStop(3);

But If you load your movie to level 0 (like in your example) you
replace the original movie, that one you have the loadMovie-code in. In
fact this gets confusing. But if you need to do this, just try to set a
global variable that stores the information where to jump.

on (release) {
_global.jumpto=15;
loadMovieNum("3STEPS_d5.swf", 0);
}

And on your loaded movie (3STEPS_d5.swf) put on the first frame:

gotoAndStop(_global.jumpto);

In this example 3STEPS_d5.swf should jump to frame 15 after beeing
loaded (But watch out that there is no possibility for the movie to load
without the variable being declared.)


hope this helps
greetings from munich!


oe




P.S.: Anopther thing: Be careful with upper an lower case spelling. Some
machines will distinguish, some will not.


[quoted text, click to view]
moamoa
9/15/2004 3:49:28 PM
Thanks for you help.
I have used your tip, however, perhaps you could help me with setting the
variable.
What would the syntax look like in this situation
(I am a creative guy but when it's comes to programing, I am not that creative)

I appreciate your help!
Greetings from LA!

oe
9/16/2004 3:38:17 PM
I have little time at the moment, please take a look at my thread

Varaibles in gotoAndStop (misspelled)
from today

The answer of jeckyl is not completely true, for you CAN use Scenes in
Navigation (as described in AS Reference). But he is completely right in
advising to avoid it - as I mentioned before there are many occasions
where they cause problems.

Jeckyl proposes a simple and good workaround for your problem. So
combine my idea wiht his proposal - If you don't understand please ask
again, I'll answer - just can't describe more in detail at the moment...


greetings from munich

oe


[quoted text, click to view]
moamoa
9/16/2004 9:34:44 PM
Hi Oe

Who is Jeckyl?
I need help on setting up the Variable as you describe. Please give me an example of script that i would use.
Thanks for the help

oe
9/18/2004 10:01:19 PM
This is whta Jeckyl wrote with my extension for your problem:


DO NOT use scenes for navigation .. they do not exist in the published movie
... that is why you CANNOT use a calculated variable for a scene name.
(This is not completely true, but neverthless do as he advises in the
following:)
Instead use FRAME LABELS (unique across all scene timelines)


So step by step:
You want to jump to Scene 2, frame 5 as an example.

In 3STEPS_d5.swf, you put a label on frame 5 of Scene 2, let's say
"Szene2_5".
On the first frame you as well put the following:

gotoAndStop(_global.label);


In your main movie on your button (where the loadMovie lies) you put:

on (release){
_global.jumpto = "Szene2_5"
loadMovieNum("3STEPS_d5.swf", 0);
}

So Flash does 2 things when the button is pressed:
1) It fills the global (i.e. available in every movie) variable "jumpto"
with the value "Szene2_5".
2) It loads the movie 3STEPS_d5.swf

In this movie it goes to the AS on the first frame which tells him to
gotoAndStop to - guess - the Value of the global variable "jumpto". And
this value is "Szene2_5" which we chose for it is the label of the frame
where it should jump to. So it jumps to Frame 5.


hope this helps!

oe

[quoted text, click to view]
moamoa
9/20/2004 10:04:35 PM
Well well Well!
Thanks for all your help OE!
I tried your suggestion, It still goes to the 1st frame of the 1st scene. I
must be doing something wrong.
Hey, I don't want to bother you too much.
I attached a sample file with the code you gave me. Please tell me if you see
anything wrong.
From movie1 it should go to movie 2 at the scene 2 frame 5.
Thanks if you can help one last time

norby!

oe
9/21/2004 2:53:06 PM
Attachments won't work in the Newsreader.
send me private!

christian.oettinger(at)gmx.de

[quoted text, click to view]
AddThis Social Bookmark Button