PDA

View Full Version : Setting Alpha via Actionscript


mjfabian
11-15-2004, 10:52 PM
Im trying to make a template for a Jeopardy game in flash, and I want to make it so that once I click a button, it dissapears (like in the real game :D)

each button triggers a boolean (true = already clicked), and in the very beginning, I have:


if ($100A){
Symbol_4._alpha(0);
}

if ($100B){
Symbol_5._alpha(0);
}

etc, etc...


And it's simply not doing anything. The .fla is attached.

Thanks in advance,
-Matt

Xeef
11-15-2004, 11:19 PM
hi and Welcome to As.Org

USE of _alpha :

My_mc._alpha=0

NOT

My_mc._alpha(0)

not sure what you wana do
if ($100A){ -->this will run if $100A is DEFINED and not 0 or false

mjfabian
11-15-2004, 11:26 PM
I changed it to

Symbol_4._alpha = 0;

and it still doesn't work.

Will this only work for movie clips? ...because you CAN change the alpha of a button...

$100A = false; is defined in the previous scene.

SirShoelace
11-18-2004, 03:58 AM
yeah i think it'll only work for an mc. i may be wrong but all changing of stuffs ive ever done in as was with mc's. you may want to try the getcolor function, then give any random hex value and then 0% for alpha

button.getColor(FFFFFF,0)

thebloodpoolkid
11-18-2004, 07:28 PM
Are you placing the ActionScript on the movieClip or the main timeline?