Claudio quick question

I dont mean to bother you but I can’t figure out what you about loading MC’s when a button is clicked. “_root.name_mc.gotoAndPlay(2);” is the script I received awhile back is it not correct? Because it doesnt seem to be working.

[AS]// button
if (_root.section != “profile.swf”) { //checks if _root.section is different than “profile.swf”
_root.section = “profile.swf”; //assigns to _root.section the value “profile.swf”
_root.transition.gotoAndPlay(“closing”); //tells transition movie to start playing its closing animation


// content mc
if (!loaded && this._url != _root._url) { //checks if loaded is false and if the content mc contains an external .swf file
if (this.getBytesLoaded() == this.getBytesTotal()) { //checks if profile.swf is fully loaded.
_root.transition.gotoAndPlay(“opening”); //tell transition movie to play its opening animation revealing the new content


//transition mc
loadMovie(_root.section, _root.content); //load whichever value is stored in the _root.section variable[/AS]

That’s fine but what if there is no external .swf to load? You can’t simply load from a movie clip contained within the stage?

This code is to be used with external swf’s

Exactly i’m not using an extrnal .swf so what about loading a movie clip that is contained on within the movie that I’m currently working on? Is it not possible or what? To load a movieclip when a button is clicked…(not loading an extranl swf.) but an internal MC?

Theres no point on doing that. If its a movie clip, theres no need to preload, so just place an action on the button to play that movie clip.

LOL this is too funny, so what IS the actionscript to play the movieclip. That has been question the whole time, I beieve we are confusing each other :beam: .

  1. This example deals with external swf’s
  2. The action to play the external movie clip is [AS]loadMovie(_root.section, _root.content);[/AS]

Can I use that to load an interntal MC?

such as “loadmovie(_root.synopsis);”

or something like that?

No you cant. Thats what im saying, if its a movie clip, just place an action on the button to play it.

*Originally posted by claudio *
**No you cant. Thats what im saying, if its a movie clip, just place an action on the button to play it. **

ugh this is tiring…what IS the action to play the movieclip when a button is clicked.

[AS]on(release){
loadMovie(“yourmovie.swf”, target );
}[/AS]There is a tutorial about loading movies here on Kirupa

And thanks for the help :wink:

You keep pointing me toward extral swf’s and that’s not what I’m trying to accomplish. I’m trying to accomplish simply playing an internal MC and I’m asking what the action is to accomplish this because the one I have doesn’t seem to be working.

You’re welcome.

on(release) {
play();
}

on(release) {
play(_root.synopsis.mc);
}

like that?

Sorry, i gave you the wrong code before…[AS]on(release) {
_root.synopsis.mc.play();
}
[/AS]

Im not getting a syntax error anymore but it isn’t working, any suggestions on what could be causing it not to work?

your referencing the wrong MC. That is the right code now just work it out. I know you can get it.