PDA

View Full Version : Disabling buttons


chibacity
01-31-2002, 04:19 PM
I would like to be able to disable/hide buttons non-programitically eg. something like a mask - but *not* a mask as there are dynamic text fields which don't display properly with masks.

I have an array of cells displaying information through dynamic text which are arranged into a scrollable grid. Each cell has a button in it, which fires some code when the user clicks them. The problem I'm having is that at some stage some of the cells are hidden behind the scrollbars, but the buttons are still clickable _ I don;t want the buttons that are out of "view" to be clickable.

Using a mask in the viewable area makes these buttons unclickable, but unfortunately messes up the dynamic text which still looks awful even if I use outlining to make it visible though the mask.

I have experimented with putting layers on top of the buttons, but you can still click them. How can I put something over them to disable them.

I don't want to solve this problem with actionscript if possible.

Thanks, Tim

tg
01-31-2002, 04:35 PM
the easiest way would be with some actionscript, not much, just a little, here is an explanation by jesse and red penjuin...

http://www.actionscripts.org/forums/showthread.php3?s=&threadid=5840&highlight=disable+buttons

chibacity
01-31-2002, 04:47 PM
tg,

Thanks, but that's not really what I want.

The problem is that I have a grid with maybe 900 MC's in it which all act like buttons. This grid is scrollable, so you would have to be programatically checking which buttons were under the scrollbars at any time, so that I could then diable them so using the scollbars would not trigger grid clicks. Checking all 900 MC's seems like it would introduce a lot of overhead and so finaggle the smooth scrolling of the grid.

Cheers, Tim.

PS One solution I've heard that I've yet to try is putting a big button, that doesn't do anything, under the scrollbar which would then intercept clicks which would have been picked up by the grid. This sounds like a bit of a kludge - anything better?

tg
01-31-2002, 05:04 PM
ya, i've seen someone mention the big button option before, your right, it is a kludge... you'll still get the little finger popping up when someone scrolls over the invisible button, and i hate the finger.

i'm tapped out, good luck... someone will be along to give a thought or two, i'm sure. but you may need to be patient...

Ricod
02-01-2002, 08:25 AM
how about u place all of the buttons u want to disable in 1 mc, add a frame where the buttons are just graphs and tell the mc to go to that frame when u want to disable the buttons and to the first when u want them to be active.