//AS3 button code going to a url
//btWhatever is the instance name of the the images that I want to make a button
btWhatever.addEventListener(MouseEvent.CLICK,onMouseClick);
// if you want a hand cursor
btWhatever.buttonMode = true;
btWhatever.useHandCursor = true;
function onMouseClick(e:MouseEvent):void
{
var request:URLRequest = new URLRequest("Graphicmuse.com");
navigateToURL(request, "_blank");
}
//basic as3 button goto frame number
button.addEventListener(MouseEvent.CLICK, clickFunction);
// if you want a hand cursor
button.buttonMode = true;
button.useHandCursor = true;
function clickFunction(evt:MouseEvent):void {
gotoAndStop(2);
}
Popularity: 36% [?]
Leave a Reply