Hi guys, I’m having some problems trying to get a button to link to a URL from within a tweening movie clip on the main timeline. Basically I am tweening scrolling credits and wish for each credit to link to a URL when clicked. I’ve used this code inside the movie clip for each button:
btnLocust.addEventListener(MouseEvent.CLICK, locustFunction);
function locustFunction(evt:MouseEvent):void {
navigateToURL(new URLRequest("http://www.fat-pie.com/locust/"), "_blank");
}
This code didn’t work, so I tried the following on the main timeline:
creds.btnLocust.addEventListener(MouseEvent.CLICK, locustFunction);
function locustFunction(evt:MouseEvent):void {
navigateToURL(new URLRequest("http://www.fat-pie.com/locust/"), "_blank");
}
“creds” being the instance name for the movie clip. This didn’t work either and it’s left me clueless as I’m a total amateur at actionscript 3. Anyways, I hope you can steer me in the right direction
Thanks in advance!