Hi,
i have a movieClip on which i have to perform a "double click" event so is there any Event or procedure to perform this event like we have "MouseEvent.DOUBLE_CLICK" in AS3.
i have used the code
dbc.onRelease = dbClick;
function dbClick(){
if(lastclick - (lastclick=getTimer()) + 500 > 0){
dbC.text = "double click"
} else {
return;
}
}
its working when i used this code on frame but this code is not working on external AS file. the error related to lastclick.
is there any code like.. "instanceName.addEventListener('DoubleClick', functionName);" in AS2
Looking for your help ..
Thanks in advance
See if the following is useful for you...
http://greenethumb.com/article/24/double-click-event-in-as2/
Thanks for your reply.
i am using this code
AS2:
dbc.onRelease = dbClick;
var lastclick:Number;
function dbClick(){
if(lastclick - (lastclick=getTimer()) + 500 > 0){
trace("doubleclick");
} else {
trace("single click");
}
}
when i clicked on dbc button two times(double click) first it trace "single click" then "double click" and here i want only "double click"
Please reply.
North America
Europe, Middle East and Africa
Asia Pacific