Want to disable a button for double-click
I've got this little program here. It's possible to change its language with a button click, changing several texts, component labels, changing a few data grids' data provider...
Which takes about 1.5 second overall. What I want to do is make sure users can't click repeatedly on language switch button, and thus freeze the program for 10 seconds or so. I've fooled around with stuff, disabling the button as I click to enable it again when it's finished, working with an "isProcessing" boolean, nothing works.
My animation totally freezes during processing, so that:
frame 1: click
frame 2: processing, takes 1.5 second (button is fisabled)
frame 3, after 1.5 second: finished (button is enabled)
I've tested a few ifs, and if the button is disabled, nothing happens when it is clicked. What I think happens upon double-click is this:
frame 1: click
frame 2: processing (1.5 sec) -- button is clicked for a second time, but since we're busy we'll take care of that in the next frame (button is disabled)
frame 3: finished, button is enabled, now button click event is taken
frame 4: processing again since the button has been pressed (1.5 sec)
...I don't really know what to do.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread||Thread Starter||Forum||Replies||Last Post|
|need help loading flv movie onto stage from button click||james890||Flash 8||0||02-23-2008 05:25 PM|
|combine button double click with drag function||dirk||Actionscript 2.0||0||01-26-2006 04:18 PM|
|double click on button||olocin||Flash MX||0||06-09-2005 02:04 AM|
|Disable Enter button so it's set for my functions||CitizenKane||General Flash||0||03-10-2005 09:16 AM|
|Desperately need help playing random sounds on button click||Bomu||Newbies||0||10-04-2004 09:32 PM|