View Full Version : odd button behaviour
emergency_pants
10-18-2004, 10:42 AM
I have a problem with a small tool I am creating.
There is a combo box inside a movieClip, and there are two movieClips with rollOver and Release handlers on them.
Before the comboBox is used, the MClip buttons work fine. After the comboBox has been used, the buttons do not work properly. The button will not register a second click unless the mouse is moved at least one pixel. Also, the rollOver hilight disappears after a click and the mouse must be moved at least one pixel to re=establish the hightlight.
It's as if after the button is clicked, the focus is forced away from the button and the mouse has to be moved again to re-establish the focus.
Could it be that the comboBox component is hogging the mouse focus from the rest of the interactive parts of my project?
That's really cheeky!! :p :confused:
Has anyone else seen this before and is there a remedy?
I need to get a sample off to client by tomorrow, and I'd rarther not send it with button bugs. So any help would be appreciated.
deQue
10-18-2004, 01:24 PM
Hi Simon, I have come across this problem in the past, and it took me a while to realize that the order of which the objects were attached to the container was causing wierd problems, such as the one you encounterred. Try seperating the two types of objects, putting the buttons inside an empty movieclip, and the comboBox on a second empty movieclip. It should solve your problem. If it doesn't you can try using something funky like this.gotoAndStop(this._currentframe); or focusManager.setFocus(myButton);.
emergency_pants
10-19-2004, 12:34 AM
deQue,
Thanks very much for your suggestions. I'll try them out asap.
:) Thank you.
emergency_pants
10-19-2004, 09:34 AM
It seems to be the focusManager.
This is ok for this project, but there's something very unclear about accessibility and using MovieClip buttons mixed with components!
If anyone can shed some light on this, I think it would be very handy.
If I set the focus to my button on rollover, it draws an unwanted border around the button. To manage this for lots of items on the screen, it could become a nightmare, managing the focus and setting more subtle focus rectangles and such. I'm very confused.
It seems like the focus manager is great for components, but if you want to mix things up, it causes problems.
Anyway... I've found the solution for now... I disabled the focusManager... hmmmm. :eek:
deQue
10-19-2004, 10:29 AM
Yeah, tell me about it... I developed a full-scale software product using Flash, and it was a nightmare to figure out there was a bug with the focusManager and the components!
I wrote myself several prototypes that make the whole focus managing a breeze. I also switched into creating everything in realtime. My FLA is completely empty, and everything is done AS. Including graphics. Only stuff not real-time are Logos and images, which will take more KBs in vector than pixels.
kumavds
11-11-2004, 07:42 PM
We had a similar problem and found a pretty quick and easy fix. Put the following code on the combobox:
on(focusIn) {
Selection.setFocus(null);
}
emergency_pants
11-11-2004, 11:51 PM
kumavds,
Thanks for the reply, I'll try that one out... it sounds better than disabling the focusManager completely!!!
:)
joletaxi
01-11-2005, 01:46 PM
Kumavds solution works. Thanks a lot.
How could we develop without internet ?
lkelly
11-08-2005, 09:58 PM
We had a similar problem and found a pretty quick and easy fix. Put the following code on the combobox:
on(focusIn) {
Selection.setFocus(null);
}
THANK YOU!
This problem was killing me for 2 days.
Andries.biz
04-23-2007, 12:23 AM
Oh if only Flash had everything inside the Help manual!
Thanks for this one, bugged me too!
Something in return (also not documented):
setTimeout(function, milliseconds, vars);
You can use this instead of irritating setInterval stuff, which doesn't work well
for certain schemes.
thanks again,
Andries.biz :)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.