PDA

View Full Version : _mc button strange behavior after click action on component


303 maddec
04-12-2004, 04:05 PM
Hi,

Here's my problem:

I have a really simple menu contained in a mc.Its content: left is a preview button (mc button) in the center a square with a textarea component (official MM), right a next button (mc button) .
all goes well, buttons are making their work...
But as soon as I click on the text area or its scroller, my prev and next button are behaving strangely:
I can't anymore click several time on the same button to have several time the resulting action. I must go out of the button (hitzone), and come back to press to have the correct behaviour. (it's like each time I must "reinitialize" my button by doing so...).
The worst is that this behaviour occurs on all the other button in my mc (I mean for example a print button or a detail button).


Does someone experiments such strange behaviour???
Please if you know the solution warn me!!!
Is the cause linked to the listener of my component?

{Thank you a million in advance;
Best regards;}

agent81
04-12-2004, 06:15 PM
you'd better show us how you've set up your button, the problem will lie somewhere in your logic there.

303 maddec
06-08-2004, 02:25 AM
Well, I found my answer. It's a matter of focus as I guessed before...

If someone else has the same problem:

Just add this in your button definition

Selection.setFocus(targetPath(this));
this._focusrect=false; //remove the akward yellow square used for debuging purpose.

This remove the focus from the component (automatically given when you click on).

Quiet simple answer!

Best regards.