PDA

View Full Version : loadMovie/unloadMovie


thebloodpoolkid
01-21-2003, 09:00 PM
did a search on this but did not find the exact answer I was looking for.

I have four buttons on the main timeline all in scene 1.

each button has a rollover event. also on the main timeline on its own layer there is a blank MC.

the way I have it set up now is:

each button has its very own blank MC in which on rollover event the blank MC will load a .swf file to it.

I included the code so on each other button that the user rolls over it then unloads the previous .swf
so no two .swf are visible at same time.

the thing is the .swf that is loaded is not centered. I had to manualy move the blank MC around on the stage to make it centered.. any other way of doin this?

the stage res =800x600

another question. Should I use the unloadMovie ot shoul I just make it so the others are not visible...which will be better.

should I use the same instance of blank MC or should I leave it as is and have a seperate blank MC for each seperate .swf I want to load.

any help/suggestions will be appreciated...I will try to provide code if needed...but at this point I am just curious.

farafiro
01-22-2003, 11:19 AM
note that the loaded swf's registration point will be over the Registration point of the holder MC
and as u know that the main time line's (root) reg point (0,0) is in the top/left
and the MC's reg poing in in the center
so u have to re-locate the MC reg point to be at the top left

thebloodpoolkid
01-22-2003, 01:52 PM
If I understood you correctly. I changed the the location of the blank MC and movied it top left of the stage. With that the .Swf file load right over the buttons it does not center it self on the stage because the fact is the .swf file I am loading is much smaller than the stage itself so fo it to load cntered I would have to do as I did and move the blank clip around the sttage till I find that point where it will load centered...or am I worng.

farafiro
01-22-2003, 01:55 PM
I don't mean to move to, I mean to edit it
double click, with the align panel, re-align it

thebloodpoolkid
01-22-2003, 02:12 PM
You are refering to the BLANK MC and the align panel over to the right of my screen here correct.

here is some code:
on (press) {
mc.loadMovie("this.swf");
if (mc1._visible, true) {
mc1.unloadMovie("this1.swf");


}
stop();
}
===============
thats what I have so far lik eI said it works but the .swf file I am loading inot that BLANK MC are not centered on the main stage.
as you said to double click to edit the BLANK MC and use the align panel...


I appreciate the help and the fact you can bare with my newbie questions. Thanks

farafiro
01-23-2003, 05:38 AM
huh ?? :confused: :confused: r u sure that code works??


on (press) {
mc.loadMovie("this.swf");
if (mc1._visible, true) { should be
if (mc1._visible== true) {
mc1.unloadMovie("this1.swf"); should be
mc1.unloadMovie();
}
stop();
}

also post the fla if u can

thebloodpoolkid
01-23-2003, 02:01 PM
yeah the code I had in there works juts the same as the code you provided. I can not upload my.fla on here its too big I'll try to put it up on some webspace for dl.

sandman9
01-26-2003, 03:15 AM
I know this is stupid but in simple english can someone tell me what the differ is between = and ==?

Thx
Sandman9

CyanBlue
01-26-2003, 03:22 AM
Howdy... :)

No question is stupid question... :D

You use = to assign some data to some variable, and you use == to check if left side of the operator is the same thing as the right side of the operator...

How about that??? Don't know how else I can explain that though... :)

sandman9
01-26-2003, 03:42 AM
thx Cyan :)

Cheers
Sandman9