Skip to main content
Inspiring
May 19, 2008
Answered

Help with Enabled Buttons

  • May 19, 2008
  • 3 replies
  • 537 views
I am looking for a way to enable/disable all buttons in a swf. I found this searching here but I don't understand it, and am looking for some of the many ways, as mentioned.

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid=1240137&highlight_key=y&keyword1=enabled

I am messing with having things load in what I call "windows" and when you close a window, basically it just collapses the .swf. The problem I have is that the cursor reacts to roll overs and I can still rollover buttons in the swf even though its collapsed. To see this prob go to:
www.custom-differentials.com

and open the gallery, then drag the gallery to the middle of the screen, close the gallery, then move the mouse around the outside of the "title bar" and watch the mouse change colors even though there is nothing there. I put a trace in the rollover handlers so I know which buttons are causing this. I just would like a broad sweep disable all buttons while the window is closed.

Thanks in advance for any help.
This topic has been closed for replies.
Correct answer kglad
well, you really don't want to disable every button/movieclip in your swf. but if you did you could use:

3 replies

kglad
Community Expert
Community Expert
May 19, 2008
you still have buttons that you want to use. you still want your menu to be enabled and you still want users to be able to reopen that window by clicking a button/movieclip.

but you could pass the movieclip (whose buttons you want to disable) to disableF(). that would work.

but the best solution for your situation is to use the _visible property.
kglad
Community Expert
Community Expert
May 19, 2008
assign the movieclip's _visible property to false when you want to "close" it and to true when you want to "reopen" it.
Inspiring
May 19, 2008
OK, I lied to you. I meant to say I was setting the _height value of the swf to .1, not the y value. Any way the lie is that I was actually setting it to 0, which is what was causing my problem. I changed the resize value to .1 and the problem dissapeared. I am going to try out your suggestion though, for s&g. Thank you for the help.

I am not gonna mark this answered cuz I am curious on the original question. Before your suggestion and me stumbling onto my own stupidity, I was trying out an array that stored button names and I would cycle through them enabling and diabling as I opened and closed. One thing I noticed was that my galleries contained 50+ pics and the latency in my push loop may have become a problem.

Thanks Again.
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 19, 2008
well, you really don't want to disable every button/movieclip in your swf. but if you did you could use:

kglad
Community Expert
Community Expert
May 19, 2008
how are you "closing" your swfs?
Inspiring
May 19, 2008
I am not really closing or unloading. I am just resizing the swf y value to ".1". I didn't want to unload the swf, so that when the window is opened back up you would be at the same spot instead of starting over.