Hi all, I would like to ask …
1.) How can I let the onClickHandler knows, which button has been clicked…
2.) Is it possible to make it to a CLASS or what ??
thanks ~~
button1.addEventListener(MouseEvent.CLICK, onClickHandler);
button2.addEventListener(MouseEvent.CLICK, onClickHandler);
function onClickHandler(e:MouseEvent):void {
/************************************
var [url:String](http://www.kirupa.com/forum/String);
if (button1.CLICK) {
url = "page1.htm";
} else if (button2.CLICK) {
url = "page2.htm";
}
*************************************/
var vReq:URLRequest = new URLRequest(url);
navigateToURL(vReq);
}