Deactive buttons on invisible mc's

hi,

i have 2 mc’s on stage.

One on level 1 (mc1) and one on level 2(mc2)

the mc2 ‘hides’ the mc1. when its loaded you can’t see a thing of mc1, but its important that it stays there… i can’t unload it or anything.

On mc1 are 2 buttons, as said, they aren’t visible, but if you move your mouse over the place they “should” be the cursor changes into that nasty little hand. And to make things worse the buttons are ACTIVE!!

is there any way i can deactivate the buttons or make mc 1 totally ‘invisible’ (without unloading it) when mc2 is on top of it?

Thanks!

did you tried:

mc1._visible = false;

?

doink! that seems so obvious… i didnt know that could work…

i can just put this in the first frame of the mc2?

mc1._visible = false; ?

can i use the level1_ thing as well?

the mc1 doesnt seem to work?

give your mc a instance name (properties when you select it)

then, in frame 1, or where ever you want.

type:

nameyougave._visible = false;

:slight_smile:

aah… thanks for your patience :slight_smile:

anyway, i’m loading mc1.swf on level 1 and mc2.swf on level 2

so i should just do mc1.swf._visible = false; ? (im not sure thats right… )

no, you use the container, where the movie is loaded into…

what is your code for loading the swf’s ?

the code is:

loadMovie(“mc1.swf”,2);
loadMovie(“mc2.swf”,2);

ok, what you need is an container.

first, create 2 mc’s on the stage with:

_root.createEmptyMovieClip(“mc1”,1);
_root.createEmptyMovieClip(“mc2”,2);

then, load your swf inside those 2 mc’s…

_root.mc1.loadMovie(“mc1.swf”);
_root.mc2.loadMovie(“mc2.swf”);

and after that, you can make sure they’re invisible using:

_root.mc1._visible = false;
_root.mc2._visible = false;

should be clear anough…

YEAH!!

THANKS!! with your help i fixed it…

its a little different though, but i’ve got it.

this is the thing:

loadI = setInterval(loadF, 100);
function loadF() {
if (_level4.getBytesLoaded()>=_level4.getBytesTotal() && _level4.getBytesLoaded()>0) {
_level4._visible = 0;
clearInterval(loadI);
}
}

only one last question… how do i loop this ?? so that it keeps checking all the time?

there are several ways of looping, the best thing is using a onEnterFrame…

try this for instance:


i=0
_root.onEnterFrame = function(){
i++
if(i >= 100){
_root.onEnterFrame = null;
}
trace(i);
}

dont know how to loop ur code tho, dont have any background on your work