Hi to all!
Have you already tried to use the event MouseEvent.DOUBLE_CLICK of
Actionscript 3.0 "
Surely, some of you has tried it without getting the desired result.
Personally, the first time that I have tried this event, it didn"t work.
On the double click of the mouse on a MovieClip to which I had associated the DOUBLE_CLICK, the respective function was not called.
I then discovered that to have the event intercepted by a listener, we need to able the property doubleClickEnabled of the object to which we want to associate the DOUBLE_CLICK.
Let us suppose to have a MovieClip named "clip_mc" placed on stage to which I want to associate the event DOUBLE_CLICK.
First of all, I able its property doubleClickEnabled the following way:
Code:
clip_mc.doubleClickEnabled=true;
then, I associate the listener to the event MouseEvent.DOUBLE_CLICK
Code:
clip_mc.addEventListener(MouseEvent.DOUBLE_CLICK,go);
and I define the function go
Code:
function go(evt:MouseEvent):void
{
info_txt.appendText(' ok ');
}
to obtain the double click on "clip_mc" as it should work:
See you next!