I'm decent with flash no guru or anything but I should be able to figure it out with just a little bit of help. I am having an issue that I can't seem to figure out. It used to be eaier with the older flash versions but I'm using Flash CS4 with Actionscript 3.0 and I have made a movie clip that I would like to be a button and how do I make it so on click it links to somewhere.
on(release) { getURL('mysite.html'); // or use something else other than getURL, any other function. }
1087: Syntax error: extra characters found after end of program. on source on(release) { I keep getting this error when I use your code.
getURL is from AS2.0 I do believe. What you want is: function gotoGoogle(event:MouseEvent):void{ var googURL:URLRequest = new URLRequest(“http://www.google.com/â€); navigateToURL(googURL); } linkButton.addEventListener(MouseEvent.CLICK, gotoGoogle); Code (markup): linkButton being the button, or w/e you want really, but on it's click, it performs that gotoGoogle function, which sets up the URLRequest for google.com.
Hey thanks for the help, I'm using Actionscript 3 if that matters? What parts of that do I change out. The goog parts in the code kinda have me confused.
For ActionScript 3.0 myButton.addEventListener(MouseEvent.CLICK, onMouseClick); function onMouseClick(event:MouseEvent):void{ var request:URLRequest = new URLRequest("link goes here"); navigateToURL(request,"_blank" ); }