I am having an error in flash when publishing saying i cannot use multiple times as i have two objects that have a link that use this script
myButton.addEventListener(MouseEvent.CLICK,goThere);
function goThere(e:MouseEvent){
var request:URLRequest = new URLRequest("http://www.URL.co.uk/");
navigateToURL(request);
}
am i missing somting major here as im from as2 background and this could be applied multiple times in as2
you could do it like this and you shouldn’t have a problem:
btw i’m not a fan of anonymous functions but in this case i think it’s ok to use them…