I was working on a project early this morning trying to get a movie clip to link onClick to a URL. Out of habit I just starting using getURL and of course it was erroring because I was compiling using AS 3.0 ;). There is a little more to it in AS 3.0 as I found out.
myClip.addEventListener(MouseEvent.CLICK, myButtonFunction);
function myButtonFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest(
"http://www.cfwebtools.com.com/");
navigateToURL(request, '_self');
}
The navigateToURL of course will determine how you want to open your link. Example in a new window or to open in the same window. Here is an example of opening in a new window.
navigateToURL(request, '_blank');
There are no comments for this entry.
[Add Comment]