PDA

Click to See Complete Forum and Search --> : flash mx


mar1300
01-07-2006, 08:24 PM
hey everyone!

quick question

I'm having a hard time playing two movie clips instance at the same time.
I have one button and i want to play two movie clips with that button.

I can load one movie fine

example:


on (release) {
loadMovie("GraphicArts.swf","Empty");

}



how would I play a second clip in that code?

thanks alot!

FlashMaster
01-10-2006, 05:50 PM
when you use the loadmovie script, you should always load into a new level.

The reason this script isnt working:

on (release) {
loadMovie("GraphicArts.swf","Empty");

}

"empty" needs to be like "1" or whatever number you want except "0"

loading into level 0 loads over the main level of your movie. So there is no way you could load 2 movies into level 0 and have them both play.

this is the correct script from your main movie:(for flash mx)

on (release) {
loadMovie("GraphicArts.swf","1");

}
on (release) {
loadMovie("GraphicArts2.swf","2");

}

that will play them both.

mar1300
01-12-2006, 05:16 AM
Thanks alot FlashMaster I'll give it a try

mar1300
01-12-2006, 05:22 AM
on (release) {
loadMovie("GraphicArts.swf","Empty");

}

"Empty" is the name of of my movie clip instance that's where my movie loads into.

when i put "1" in place of it nothing happens.

Patrick Shannon
01-12-2006, 05:34 AM
Not sure if this will help.....this follows for Flash MX 2004, not sure if MX is similar....when you right click on an item (in this case, the .swf), you can assign a library item as "Linkage" and give it a name. Otherwise if you don't, the flash file doesn't think you need that .swf if it's not on your stage.

lkw
01-12-2006, 05:22 PM
on (release) {
loadMovie("GraphicArts.swf","Empty");

}

"Empty" is the name of of my movie clip instance that's where my movie loads into.

when i put "1" in place of it nothing happens.

change the "instance name" of your mc to 1 and you need a second movie clip with instance name = 2 for the other movie to load

you can also createEmptyMovieClip so you don't have to do the above

mar1300
01-12-2006, 05:39 PM
thanks i'll give it a try

casedsgn
01-25-2006, 05:20 AM
Yeah, you're on the right track by loading into clips vs. loading into level's like flashMaster suggested.... avoid loading into a level on the raw root timeline... never know what you might overwrite or inadvertently replace that way. Loading into clips is a MUCH better practice as things are much easier to manage that way.

You can also alter your code a little to make it less combersome using dot notation.. like this:

on (release) {
empty01_mc.loadMovie("GraphicArts.swf");
empty02_mc.loadMovie("AnotherExternal.swf");
}
//empty01_mc being the instance name of an empty clip
//empty02_mc being the instance name of another empty clip