# Flash menu - dynamically showing current page

**URL:** https://forum.kirupa.com/t/flash-menu-dynamically-showing-current-page/7755
**Category:** flash
**Created:** [November 7, 2002, 1:32am UTC](https://forum.kirupa.com/t/flash-menu-dynamically-showing-current-page/7755 "2002-11-07T01:32:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![merrick](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@merrick](https://forum.kirupa.com/u/merrick)
#### Post date: [November 7, 2002, 1:32am UTC](https://forum.kirupa.com/t/flash-menu-dynamically-showing-current-page/7755/1 "2002-11-07T01:32:15Z")

</div>

The situation is pretty simple, yet I’m feeling like a simpleton since I can’t figure it out.

I have a standard navigation menu that runs throughout a site. Each button has a simple rollover animation, taking the default state from green with blue text, to blue with white text.

How can I tell Flash what page I’m on so the current page’s button is blue by default?

Cheers

---

<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: [November 7, 2002, 1:34am UTC](https://forum.kirupa.com/t/flash-menu-dynamically-showing-current-page/7755/2 "2002-11-07T01:34:58Z")

</div>

> \*Originally posted by merrick \*  
> \*\*How can I tell Flash what page I’m on so the current page’s button is blue by default?  
> \*\*

didnt understand that one!

yours,  
h88

---

<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: [November 7, 2002, 1:37am UTC](https://forum.kirupa.com/t/flash-menu-dynamically-showing-current-page/7755/3 "2002-11-07T01:37:23Z")

</div>

all you do is you make the button blue in that movie…

u don’t have to have flash know what page ur on

---

<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: [November 7, 2002, 1:38am UTC](https://forum.kirupa.com/t/flash-menu-dynamically-showing-current-page/7755/4 "2002-11-07T01:38:46Z")

</div>

Hehe, sorry about that.

Okay, say I have 10 buttons & 10 pages. If I’m on page 5, how can I send a command to the flash movie using JS to say “Make button 5’s background blue instead of the default green every other button is using”?

---

<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: [November 7, 2002, 4:17am UTC](https://forum.kirupa.com/t/flash-menu-dynamically-showing-current-page/7755/5 "2002-11-07T04:17:39Z")

</div>

Okay, got it sorted out. I created 10 new scenes, one for each button, with the appropriate button on each made blue. Then I added 10 new frames on Scene 1 which called gotoAndStop(“sceneName”,1)

Then I just called window.document.submenu.GotoFrame(theFrame); from the HTML page using the body tag’s onLoad function. So if I wanted to highlight button 1, I called window.document.submenu.GotoFrame(1);

Not very elegant, but it works sweet as, and only added about 3K to the swf. Anyone have a better way to do it though?
