PDA

View Full Version : Alpha levels


sblundell
12-05-2001, 02:39 PM
I am wanting to set the alpha of a button symbol to 0 when clicked on. What is the script for this?

Thanks in advance.

Steve

evilregis
12-05-2001, 02:51 PM
this._alpha = 0;

now the button will still be active and clickable... is that what you want? or do you want to disable it and clear it once it has been clicked?

.:er:.

sblundell
12-05-2001, 03:09 PM
That still seems to set the alpha of the whole movie as the whole movie dissapears!!! And I dont really want people to be able to click on it when its gone either!

Thanks for the help.

Steve

evilregis
12-05-2001, 03:15 PM
did you place the code in the button's on(release) code or in the movieclips mouseup?

and if you want the button to disable... it's best to make an mc containing two frames. one frame will contain the button graphic. then create an invisible button over top one of the graphic. put a stop() action in each frame and when the user clicks the button send the mc to the frame without the invisible button.

.:er:.

sblundell
12-05-2001, 03:20 PM
on the buttons release

evilregis
12-05-2001, 03:39 PM
this does what you want...
but you will ahve to figure out how to make the button active again later if it's supposed to become active again after a later event... it's simply a matter of telling the button movie to go to the 'active' label.

.:er:.

KarenInPA
12-10-2001, 09:53 PM
Did anybody consider the ._visible property? I'm not 100% sure, but I think that it diables buttons when set to 0. Just put the button in a movie clip symbol and then you can target it from any timeline. So on release, it would be _root.movieclipname._visible = 0;

Then, later on, you could have the button re-appear: _root.movieclipname._visible = 1

Hope that helps,
Karen

PS. The above paths assume the movie clip is on the main timeline, of course.

Ricod
12-11-2001, 08:57 AM
If u want to disable the button, go with KarenInPa. Setting the _alpha to 0 just makes it invisible, but still active. Setting the visibility to 0 makes it temporarily inactive.