|
-
[F8] catch all AS2 code for buttons enabled?
I searched around and didn't find much to help me, but I have a (hopefully) quick question.
In my application I have many many MCs acting as buttons, and they are all over, some are inside other MCs some are not. Most are set to _alpha = 0; and when parent MC is clicked on they tween to _alpha = 100;
Everything works perfect and I love it all so much, HOWEVER, because the buttons are _alpha they are still clickable where they rest.
I was wondering if there was a catch all code I could use to disable them unless alpha was 100. Something I could put in the AS file once for all buttons, perhaps?
I was thinking along the lines of:
Code:
if (_alpha <=99){
buttons.enabled = false;
}
else if (_alpha == 100){
buttons.enabled = true;
}
but I can't think of a way to add that once and have it control ALL buttons that _alpha is less than 100.
Is there a way?
Thanks,
~MoN
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
-
Banned
instead of making _alpha=0, make it _visible=false
-
Thanks for that, I did try that a few times, I guess I just can't get the as file code right. I will keep trying though!
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|