# .swf file as a navbar

**URL:** <https://forum.kirupa.com/t/swf-file-as-a-navbar/113265>\
**Category:** Uncategorized\
**Created:** [June 16, 2004, 1:18pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265 "2004-06-16T13:18:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danulf](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/danulf/32/555_2.png) [@danulf](https://forum.kirupa.com/u/danulf)\
**Post date:** [June 16, 2004, 1:18pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/1 "2004-06-16T13:18:47Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 1:53pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/2 "2004-06-16T13:53:56Z")

</div>

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

```auto

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

```

```auto

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

```

this will make “[http://www.yourlink.com](http://www.yourlink.com)” load into “yourFrameName”

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 2:09pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/3 "2004-06-16T14:09:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 3:47pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/4 "2004-06-16T15:47:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 4:42pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/5 "2004-06-16T16:42:44Z")

</div>

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.

```auto

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 5:28pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/6 "2004-06-16T17:28:32Z")

</div>

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?!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 6:14pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/7 "2004-06-16T18:14:43Z")

</div>

yes it should

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 10:26pm UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/8 "2004-06-16T22:26:28Z")

</div>

a thing you may take in notice is the following,

```auto

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,

```auto

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

```

hope this helps

gl =]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2004, 9:51am UTC](https://forum.kirupa.com/t/swf-file-as-a-navbar/113265/9 "2004-06-17T09:51:54Z")

</div>

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