-
ActionScript 3 Link to same window
This shouldn't be as difficult as it is...
Basically, I'm trying to build a navbar with flash. It's all together, but I can't get the link to open in a new window instead of the same window.
I followed a guide on making the code, and then I added in "_self" to get it to open in the same window. But I get a syntax error.
"Scene 1, Layer 'Actions', Frame 1, Line 8 1137: Incorrect number of arguments. Expected no more than 1."
I take it this means I'm not allowed to have more than one parameter for the navigateToURL function...
But I don't know where else to put it. It's exactly what it looks like I should do.
Can anyone see the error of my ways?
Code:
import flash.events.MouseEvent;
import flash.net.URLRequest;
home_btn.addEventListener(MouseEvent.CLICK,gotoHome);
function gotoHome(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.skillunionclan.gridhost.co.uk", "_self"));
}
T
-
Senior Member
navigateToURL(new URLRequest("http://www.skillunionclan.gridhost.co.uk"), "_self");
URLRequest has only one Argument.
- The right of the People to create Flash movies shall not be infringed. -
-
try using "_blank" to open in a new window instead of using "_self"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|