Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Action Script Load Movie Problem 2

Status
Not open for further replies.

Ivan1

Programmer
Jun 18, 2001
113
US
Hello.
I'm loading an .swf onto the stage from a sub-directory.
That movie loads up, but the button in that movie that refers to the original movie in the main directory does not work, possibly besause of action script. How do you load an .swf in the main directory from .swf that is a sub-directory?

Any suggestions would be much appreciated.
Regards,
Ivan
 
You could simplify your quandry if you load the secondary SWF into level 1 of the main movie. That way when you need to go back to the original SWF, all you have to do is "park" or unload your secondary SWF. Have a look at this Macromedia TechNote:


This should make life easier!
 
The fact that you loaded the new movie in from a sub directory doesn't have a bearing on the paths in this instance - the main .swf that started the process is still in the main directory and that's what dictates the paths you should use with loadMovie. Slainte

 
Let me give you a better idea of what I'm talking about.

Here is my directory structure.
MY DOCUMENTS
|
|
MAIN--
|
|
|ONE
|
|
|TWO
Anyway... so I'm loading any.swf from "MAIN" on level 2.
OK
Now, I'm loading an .SWF from "ONE" by using

on (release) {
loadMovieNum ("ONE/mine.swf", 2);
}

Now, now I want to load any.swf from "MAIN" directory by a push of a button from mine.swf. First I got to change directories. How do you do that?

Thanks
Hope this clears it up.
Regards,
Ivan

Now I'm trying to


 
Everytime you want to go back in a directory, use:
../
for every folder you want to go back, thus two directories back would be:
on(release)
loadMovieNum("../../any.swf",2);

../ just indicates one directory back.
/ indicates one directory forward.
and nothing indicates the same directory
 
IMHO, best is allways to use the full path (including the then there should be no confusion!

Regards,

new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top