.swf file as a navbar

Hi! I have created a navbar in flash for my site (I’m using frames on the site).
My problem is how to get the links to work!
In flash 5 you can just choose that the links will be opened in a special frame, but how do I do that in mx 2004? Plz help me! I’m stuck…:jail:

You can just define the html framename in your flash as
do as in the following :


<frameset rows="80,*" frameborder="NO" border="0" framespacing="0">
  <frame src="top.html" name="topFrame" scrolling="NO" noresize>
  <frame src="bottom.html" name="yourFrameName">
</frameset>


yourButton.onPress = function(){
getURL("http://www.yourlink.com","yourFrameName");
}

this will make “http://www.yourlink.com” load into “yourFrameName”

thx for the fast answer! I’m gonna try it right now :smiley:

It doesn’t work =/ and i get a error message when i export it …

that specific function should not result in an error - are you sure that it’s that part of your code that is the problem?
also, you might wanna use onRelease instead of onPress.


yourButton.onRelease = function() {
	getURL("http://www.yourlink.com", "yourFrameName");
};

yea, i think it’s odd too! But can I do like this: I have the flash navbar in a frame that I call top. I wanna load all the content to the main frame. That should work right?!

yes it should

a thing you may take in notice is the following,


yourButton.onRelease = function() {
getURL("http://www.yourlink.com", "yourFrameName");
};

this code is NOT to be placed ON the button, but on the first frame of your movies maintimeline. Where “yourButton” should be replaced with the name of your buttoninstance.

However if you want to drop the code ON the button use the code below,


on(release){
getURL("http://www.yourlink.com", "yourFrameName");
}

hope this helps

gl =]

ok thanks! Thats much easier, cause I have so many buttons in the navbar :smiley: