PDA

View Full Version : Wrong directory


Huw
09-16-2003, 07:21 AM
Hi,

I have created a very basic preloader, that runs from the following script:

frame 1 script:

onClipEvent (enterFrame) {
ifFrameLoaded ("MainMovie", 36) {
_root.gotoAndPlay(2);
}
}

Huw
09-16-2003, 07:25 AM
Sorry for the multi-thread, for some reason only half my message was previewing, I had to retype it and paste it in form another application sorry, here the whole story:

Hi,

I have created a very basic preloader, that runs from the following script:

frame 1 script:

onClipEvent (enterFrame) {
ifFrameLoaded ("MainMovie", 36) {
_root.gotoAndPlay(2);
}
}

gotoAndPlay ("MainMovie", 1);

This works really well, the problem occurs when I try and use this same script in another .swf (parties.swf) file that's loaded into an empty movie holder in the main movie. The swf files that need to be loaded into the empty movie holder exist in the same directory as the main movie but i'm sure I need to change the following line but i'm not sure what it needs to be or how it needs to change:

_root.gotoAndPlay(2);

can anybody help?

webguy
09-16-2003, 10:09 AM
read up on this tutorial..

http://www.actionscript.org/tutorials/beginner/paths/index.shtml

_root on means _root for the clip that is immediately on stage. So if you load another movie, it's _root is not longer absolute _root, it is now whatever level it has been loaded into.

web