I can't understand why this code doesn't work, please help.
button1.addEventListener (MouseEvent.DOUBLE_CLICK, clickHandler);
function clickHandler(event:MouseEvent):void {
var url:String = "http://www.hotmail.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request);
} catch (e:Error) {
trace("Error occurred!");
}
}
However, CLICK works fine.
Thanks,
Yin
theyinhe,
> I can't understand why this code doesn't work, please help.
> button1.addEventListener (MouseEvent.DOUBLE_CLICK, clickHandler);
// snipped code
> However, CLICK works fine.
Did you set the button's doubleClickEnabled property to true?
David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
-----------------------------------------------Reply-----------------------------------------------
use button1.doubleClickEnabled=true;
-----------------------------------------------Reply-----------------------------------------------
Thanks so much for your help! Are there any good resources for Actionscript 3? Unfortunately, none of the books on the subject are going to be out until a few months from now...
-----------------------------------------------Reply-----------------------------------------------