Loadmovie and parent woes! Script syntax expert please help!

This is part of a preloader, but Im having trouble getting it to load the movie\r

 \r\rloadThis = _parent._parent._parent.content;\r\r_parent._parent.holder.loadMovie((loadThis)+".swf"));\r\r_parent.loadBar._height = 0;\r\r

\rI get this from the debugger:\r

\rSymbol=Preloader Code, Layer=Layer 1, Frame=1: Line 2: ‘;’ expected\r_parent._parent.holder.loadMovie((loadThis)+".swf")); \r
\rSo I try this:\r

 \r\rloadThis = _parent._parent._parent.content;\r\rloadMovie((loadThis)+".swf"), _parent._parent.holder);\r\r_parent.loadBar._height = 0;\r\r

\rand I get this from the debugger:

\rSymbol=Preloader Code, Layer=Layer 1, Frame=1: Line 2: Wrong number of parameters; loadMovie requires between 2 and 3.\rloadMovie((loadThis)+".swf"), _parent._parent.holder); \r
\rCan you tell me whats wrong with my syntax?\rI know this method is possible because this works:\r

 \r\rf = 1;\r\r_root.Holder.loadMovie((f)+".swf");\r\rstop ();\r\r

\r\r\rPlease, please help! :)\rJohn Ziebro\rLiquid Genius

I’m not sure, but I don’t believe that there is a reason to include the _Parent._parent._parent in the string you are calling… it should be something like this\r\rloadThis=content;\r\radding the “_parent”'s adds them to the string name of the swf which unless the swf file is actually called that, wouldn’t make sense…\r\rhmm, I’m wondering if I’m making sense. :slight_smile:

loadMovie((loadThis)+".swf"), _parent._parent.holder);\r\rcount your brackets, you’ve two openers and three closers…

Thanks supra… but am I correct? isn’t it going to sqwew things up having the _parent._parent._parent added into the variable string?

if you mean where liquid says\r\r&nbsp &nbsp &nbsp &nbsp loadThis = _parent._parent._parent.content;\r\rthat means he’s accessing the variable content, located three _parents up.\r\rif you mean here:\r\r&nbsp &nbsp &nbsp &nbsp loadMovie((loadThis)+".swf"), _parent._parent.holder); \r\rthe _parents are to do with the target movie, not the swf to load.

aaahhh, very interesting… I was not seeing that there were no quotes there… ah well, just slap me in the head and call me silly… sorry bout that