PDA

View Full Version : more about loadMovie on a movieclip.


franmartin
05-21-2001, 07:52 PM
hi again.
more about loadMovie on a movieclip.
I have a Mainmovie.swf whit a blank movieclip (instance name: containerclip) to nest external loadmovie.swf and a button to load this .swf

1.- loadmovie01.swf on containerclip : there are four different syntax to load (at least):

on (press) { loadMovie ("loadmovie01.swf", _root.containerclip); }
on (press) { loadMovie ("loadmovie01.swf", "_root.containerclip"); }
on (press) { loadMovie ("loadmovie01.swf", "_level0.containerclip"); }
on (press) { loadMovie ("loadmovie01.swf", _level0.containerclip); }

first question. Targeted movieclip: to be with quotation marks or not to be with quotation marks that is the question

to unload that movie from containerclip another button where any of the next scripts work properly :

on (press) { unloadMovie (_root.containerclip); }
on (press) { unloadMovie ("_root.containerclip"); }
on (press) { unloadMovie ("_level0.containerclip"); }
on (press) { unloadMovie (_level0.containerclip); }
on (press) {unloadMovie ("/containerclip"); }

but...
second question : when click to unload with any of those different scripts from above output gives a message : Error opening URL "file:///C|/mydocuments/flash5/test3/" (the path to the folder where the .swf files are placed) and in the debugger the action to unload shows that level0.containerclip is loading the Mainmovie.... ummm Mainmovie is attempting to load itself in its inner containerclip. it works but unload is really unloading ??

third question: which could be the script to play the frame (2) on loadmovie01.swf when itīs nested on containerclip inside Mainmovie??

the final question is: which is the status of a movie.swf nested on a movieclip from the Mainmovie.swf?

Thanks in advance.

Jesse
05-22-2001, 06:54 AM
... whether tis nobler in the mind to suffer the String and Expressions of outrageous syntax... :)

1. Yes, use quotes.

on (press) {
loadMovie ("loadmovie01.swf", "_root.containerclip");
}

Without quotes it would be indicating you wanted to load into the movie clip whose instance name is specified in the _root.containerclip variable.

Same goes for question 2, use quotes.

That error is caused by flash looking for the non-existant variable _root.containerclip which therefor has no content and causes Flash to try to load a movie with no name.

Question 3: _root.containerclip.gotoAndPlay(2)

Question 4: Huh? Status?

Cheers

Jesse

franmartin
05-24-2001, 08:58 PM
What i am talking about when i am talking about status? ummmm...
Well, loadedmovie.swf when is loaded on Mainmovie.swf is placed on different level and to communicate between them you use _level. Everyone on its own level: status.

But when it is loaded on a (empty and just one framed)movieclip placed on mainmovie.swf its "status" change and its behaviour is the same like a movieclip. Loadedmovie.swf become a instance on the mainmovie.swf. Became the container.mc.
To communicate with loadedmovie.swf now, you target the container mc. _root.container.gotoAndPlay (2). And container which was a movieclip without content and frames, now is filled with content and frames.

Jesse
05-25-2001, 04:17 AM
So have you just answerred your own question??

To target movies loaded into blank MCs you use paths as you would to target any other MC;

_root.containerMC.gotoAndStop(21)

Cheers

Jesse