victim
January 16, 2003, 10:39am
1
hi all
is it possible to create a mask over an existing button to disable it.
e.g- if I load a JPG directly over a button, the button is still active underneath the JPG. can the JPG have a mask attatched to it or even an invisible button that covers the the existing button so it becomes inactive.
…similar prblem to the guy a couple of threads down, but slightly different situaton.
all input appreciated.
system
January 16, 2003, 5:42pm
2
Just disable it.
I don’t know if it works for button symbols (I don’t think it does), but it works on movieclip symbols that are acting as buttons.
_root.yourButtonName.enabled = false;
Tah Dah, disabled.
system
January 17, 2003, 7:39am
3
thanks dude,
yeh it works, i’ve used…
on (release) {
loadMovieNum(“ple image1.swf”, 2);_root.b1.enabled = false;
}
but one prob,
when I close (‘ple image1.swf,2’) the button is still disabled and i want it enabled when i close the loaded swf’s and the code has no affect in the swf i’m loading on level to.
how can i enable it again.
cheers
system
January 17, 2003, 7:47am
5
but that code has to go with the close button in the loaded SWF which will have no affect on the mian movie.
is that correct.
because where would i apply it in the main movie?
system
January 17, 2003, 7:50am
6
Well the _root of your loaded movie because the _root of the movie you are loading in.
So with that said… _root.b1.enabled = true; should work, even if done inside the movie.
I think. Worth a try eh?
system
January 17, 2003, 7:54am
7
but i want to tell it to enable once Swf level 2 is closed, which i close in Swf level 2.
how will the main movie know when i close level 2 swf?
…bare with me, i’m new to this.
system
January 17, 2003, 7:59am
8
What is the code on your close button?
system
January 17, 2003, 8:04am
9
the code on the close button… (close button SWF level 2)
on (release) {
unloadMovieNum(2);
}
…and on this release I’d like it to enable buttons on the main movie, I’ve had no luck so far.
system
January 17, 2003, 8:08am
10
on (release) {
_root.b1.enabled = true;
unloadMovieNum(2);
}
That doesn’t work?
system
January 17, 2003, 8:26am
11
no it didn’t…
the code in SWF 2 didn’t reactivate the button in the main SWF…
I dunno, I thoought it would do it…
here’s both codes…
Main SWF… button B1
on (release) {
loadMovieNum(“ple image1.swf”, 2);_root.b1.enabled = false;
}
SWF level 2, close button…
on (release) {
_root.b1.enabled = true;
unloadMovieNum(2);
}
system
January 17, 2003, 8:53am
12
I tried to recreate the situation. It didn’t help much. I don’t know what to do.
Maybe the answer will come to me in the morning. I am kinda tired right now (3:50am).
system
January 17, 2003, 12:24pm
13
get some sleep bro, I think the last time u helped me out on a problem it was about that time aswell…
system
January 18, 2003, 5:08am
14
Duh me… lol, I got it now…
on (release) {
_level0.b1.enabled = true;
unloadMovieNum(2);
}
I didn’t test it, but I am pretty sure it will work.
system
January 19, 2003, 12:44am
15
yep, right on the money…
appreciate ure responses.
while it’s working fine theres still 1 problem,
on (release) {
loadMovieNum(“ple image1.swf”, 3);loadMovieNum(“ple back.swf”, 2);
_root.b1.enabled = false;
_root.text.enabled = false;
_level0.news.enabled = false;
}
the root in this situation is also level 1 on another SWF, so on the last line of code, _level0.news.enabled = false; I want it to disable the news button and shouldn’t that code do it??
because it’s not.
system
January 19, 2003, 4:59am
17
Glad you got it all working now