I've been working on some buttons in flash that I'm using as links but I keep getting syntax errors and wondered if anyone could help.
Here's my actionscript 3.0 code:
1 function gotoIndex(event:MouseEvent):void
2 {
3 var IndexURL:URLRequest = new URLRequest("http://google.com/");
4 navigateToURL(IndexURL);
5 }
7 HomeLink.addEventListener(MouseEvent.CLICK, gotoIndex);
and here's the errors I'm getting:
1093 syntax error var IndexURL:URLRequest = new URLRequest("http://google.com/");
1084 Syntax error: expecting rightparen before colon. var IndexURL:URLRequest = new URLRequest("http://google.com/");
HomeLink is the button instance name
Any help would be immensely appreciated!!!!!!!!!!!!
Here's my actionscript 3.0 code:
1 function gotoIndex(event:MouseEvent):void
2 {
3 var IndexURL:URLRequest = new URLRequest("http://google.com/");
4 navigateToURL(IndexURL);
5 }
7 HomeLink.addEventListener(MouseEvent.CLICK, gotoIndex);
and here's the errors I'm getting:
1093 syntax error var IndexURL:URLRequest = new URLRequest("http://google.com/");
1084 Syntax error: expecting rightparen before colon. var IndexURL:URLRequest = new URLRequest("http://google.com/");
HomeLink is the button instance name
Any help would be immensely appreciated!!!!!!!!!!!!
Last edited: