Jump to content
xisto Community
Sign in to follow this  
catalina_cherrub

Actionscript Navigation Bar Into Html

Recommended Posts

Hey,

I have made a navigation menu in flash. All the links work properly etc. I have placed it into my HTML file but each time I click on a menu item, like home, work, about etc, it will open the requested page in a SEPERATE browser window or tab. How do I make all the links open in the SAME window?

The actionscript for each button is as follows:

home_Btn.addEventListener(MouseEvent.CLICK, gotoHome);function gotoHome(event:MouseEvent):void {	var gotoHome:URLRequest = new URLRequest("http://http://www.mywebsite.com.au/;;	navigateToURL(gotoHome,"_self"); }

I have a feeling it is a problem with the HTML in my page. How should i have set it out? At the moment I have the swf file in a div that goes on every page. Whats the recommended way of doing this? I can't seem to work it out.

Thanks.

Share this post


Link to post
Share on other sites

I know little about actionscript and not knowing what's really going on from my understanding, try this trick to make sure your link opens appropriately.In your HEAD portion, insert

<base target="_parent">

to ensure it opens at the current browser window. The values are the same as_blank_parent_self_topframenameBe sure to use the full URL for href

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.