Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Actionscript Navigation Bar Into Html


1 reply to this topic

#1 catalina_cherrub

    Newbie

  • Kontributors
  • Pip
  • 0 posts

Posted 09 February 2010 - 11:22 AM

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://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.

#2 BuffaloHelp

    Sterling Archer

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 4,088 posts
  • Gender:Male
  • myCENT:50.18

Posted 10 February 2010 - 02:45 AM

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
_top
framename

Be sure to use the full URL for href




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users