PDA

View Full Version : syntax help


iredlands
01-15-2003, 02:18 AM
i have a movie thats made up of about a dozen clips, coming to an end with a sort of menu page

what i would like to do is when the movie starts it runs through all movies from the primary source and from the menu page i would like to be able to replay each movie individually
(without making 2 copies of each movie)

ie:
[original source = primary] plays 1 through 12

if

[original source = menu ] plays 1 or 2 ... returning to menu page

i presume an if statement loading the next movie would be appropriate

if (referingurl == menu)
loadMovieNum("menu.swf", 0);
else
loadMovieNum("next.swf", 0);

can someone advise me of the appropriate syntax?

flashnewbie
steve

annexion
01-15-2003, 03:14 AM
You almost have it...

if (referingurl == menu) {
loadMovieNum("menu.swf", 0);
}else{
loadMovieNum("next.swf", 0);
}

You might want to load it into a movieclip rather than a level, that way you can control it's placement and all that better.

Good luck.

iredlands
01-15-2003, 04:16 AM
how do i pass the variable (url) from the originating clip?
by using the send via post....

loadMovie("*******.swf", startmoviehere, "POST");


is "referingurl" a valid variable i cant seem to find it in the docs?
[i thought that part of the code was an expression]

load it into a movieclip rather than a level?
using target rather than level....

if (referingurl == menu) {
loadMovieNum("menu.swf", startmoviehere);
}else{
loadMovieNum("next.swf", startmoviehere);
}


sorry for the silly questions - learning is hard understanding is critical

steve:confused:

Ricod
01-17-2003, 01:25 PM
That's not a silly question Steve. A silly question would be : "I didn't ask anyone, didn't try anything, why doesn't it work ?" ;)

"referingurl" is just a name. Variable names can be anything as long as you don't use any already in use. Giveing a varaible the name "_root" will definitely confuse Flash.

You can use "startmoviehere", but you do have to define "startmoviehere". For instance, you have an empty mc on the main timeline. It's instance name "emptyContainer". It's path would be : _root.emptyContainer.

startmoviehere = "_root.emptyContainer";

Now, Flash knows what you mean with "startmoviehere".