Double Clicking button to perform action?

I would like to have a button that on press will be able to drag and on release will stop drag. I have this done. What im trying to figure out is how to make the same button load a movie clip if you double click it.

Thanks for the help!!

Here’s the code for double click that is on Actionscripts.org , I think it has exactly what your looking for.

/*
Inspired by Emax - Extended by Madokan
*/
movieclip.prototype.doubleClick = function(speed) {
if ( getTimer()-oldTime <= speed ) return(true);
oldTime=getTimer();
clickcount=0;
}

movieclip.prototype.tast = function () {
if(getTimer()-timestamp>=250 && clickcount==1){
trace(“singleclick”);
ausgabe = “Singleclick”;
clickcount=0;
}
}

setInterval(tast, 10);

Button.prototype.onPress = function() {
if(doubleClick(250)) {
trace(“Doppelklick”);
ausgabe = “Doppelklick”;
};
clickcount++;
timestamp=getTimer();
}

hope that helps,
-Dave

Thanks for the reply. I’ll see if I can get it working. By the way great site! NIce to hear from someone in tejas - I live in Denton…

Ok, im a bit confused on what I need to do with the AS. Should the AS listed above attached to my button or just in the layer?

I attached a simple .fla to this post. Hopefully this will help you out. I also translated some of the German in there (even though there wasn’t much) to english so you can hopefully better understand what each thing does.