all groups > macromedia flash sitedesign > october 2003 >
You're in the

macromedia flash sitedesign

group:

Modal window


Modal window homygad
10/30/2003 4:58:20 PM
macromedia flash sitedesign:
I have a Flash form (form A) with lots of buttons and other components such as comboboxes on it. Another Flash form (form B) can be opened from the first one. I want to have all components on form A to be disabled while form B is opened, that is, I want form B to behave as a modal window. How can I do this?
I was trying to disable all components in form A one by one but I was thinking that there should be a cleaner way to get the same results. Any ideas?

I am using Flash MX and Actionscript 1.0

Thank you in advance


Cecilia.

Re: Modal window Laiverd.COM
10/30/2003 6:48:52 PM
DARN YOU REALLY LOVE TO SPAM THESE NEWSGROUPS. PLEASE STOP.

--
----------------------------------------------------------------------
Please reply only to the group, so everyone may share
----------------------------------------------------------------------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
http://www.macromedia.com/desdev/mx/flash/
http://www.macromedia.com/v1/tipsubmission/maintopic_browse.cfm
----------------------------------------------------------------------

Re:Modal window PaulWeston
10/31/2003 3:43:09 PM
I had exactly the same situation last week (except I'm using AS2, but that's beside the point for this) - I needed a way to show modal dialog boxes. I searched the internet for an example that might help but came up with nothing. There were ideas on how to do it that were over the top, but I came up with a home-baked solution that works fine and is simple to implement.

To prevent bits behind a dialog box getting any focus, just put a BLANK button (roll your own) underneath the dialog box. When you display the dialog box, set the background button to start at 0,0 and size to something like 2000 x 2000 so that it covers whatever screen area exists.

If you create the button in a separate movieclip and then put it on the bottom layer of the dialog box, you can give it an alpha of 0% making it transparent. This means that you can see the window stuff behind the dialog box but can't click on any (because the 'button' gets the focus, not the bits under it).

I hope you get the idea. I found that setting the button transparency to something like 15% actually drew focus to the dialog box, it seems to dull down the background down quite nicely.

my layers sort of look like this:

-->actions
-->Dialog1 --> text boxes, buttons, visual fluff
--> blank button background 0,0 -> 2000,2000, transparency 15%
--> interface underneath

I have attached my rough example, the SWF should run fine if you've got the latest flash player but you'll need Flash MX 2004 Pro to see the coding.



http://webforums.macromedia.com/attachments/flashinterface.zip

AddThis Social Bookmark Button