Okay, so this is my first flash site. I followed the “first flash site” tutorial on here and everything worked out great.
My main SWF is called “water.” On “water” I have buttons for my various pages. When you click a button it loads an external SWF, let’s say it loads my “media” SWF. The actionscript for the button on the “water” SWF would look something like this:
on (release) {
_root.contents.loadMovie(“media.swf”);
}
Okay, that part is working like butter. Now here is my problem. In my “media” SWF I am trying to make a thumbnail picture viewer thingy. I have a button that loads another external SWF, let’s call this other SWF “1” The actionscript for the button in my “media” SWF looks like this:
on (release) {
_root.pictures.loadMovie(“1.swf”);
}
The thumbnail picture viewer works fine when I just view the “media” swf, but it doesn’t work when I load the “media” swf through the “water” swf.
I hope this isn’t too confusing…here is a heirarchy of my site.
i know your problem, had it once to, but its really simple when you think about it
_root.contents.loadMovie(“media.swf”);
loads the media.sw inside the contents movieclip on the root
that worsk fine, and is the right way to do it,
BUT, if you load inside a loaded movie… like you do…
_root.pictures.loadMovie(“1.swf”);
it will search the pictures movieclip on the root… wich is inside the media.swf… but you loaded media.swf inside contents on the root… so actually, the pictures movieclip dozn’t exists on the root, but inside the contents
_root.contents.loadMovie(“media.swf”); - will move all the movieclips also inside that movieclip, so your pictures folder is right here:
_root.contents.pictures
and not
_root.pictures
to avoid this, use _parent instead of _root (_parent goes 1 level up)
xample:
if you have this nested movieclip
_root.clip1.clip2
and you have a script inside clip2 with,
_parent._x+=300