# Menu Help

**URL:** <https://forum.kirupa.com/t/menu-help/20760>\
**Category:** Uncategorized\
**Created:** [May 13, 2003, 5:27am UTC](https://forum.kirupa.com/t/menu-help/20760 "2003-05-13T05:27:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![titter](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@titter](https://forum.kirupa.com/u/titter)\
**Post date:** [May 13, 2003, 5:27am UTC](https://forum.kirupa.com/t/menu-help/20760/1 "2003-05-13T05:27:00Z")

</div>

Been a lil bit since I posted here, just got back into my flash work, time to get back to the best group for it. Anyway, I need some help with a menu scheme. It is a 5 button menu, all 5 buttons are sperate but are the same animation. When you hover the button the button and text reverse, and when u go of it reverses again. Now I wanna have it, if I slick on the button the reverse will stay until I click on another button. The following link:

[www.evilattitude.com/vexed/index.html](http://www.evilattitude.com/vexed/index.html)

is the menu. The music section, as you notice on hover the white text goes blue and the bg goes white. Now if I click this I wanna make it stay like that, until anotehr button is click. I think I explained myself the best I could…so anyhelp would be apreciated. Thxs in advance.

---

<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:** [May 13, 2003, 1:19pm UTC](https://forum.kirupa.com/t/menu-help/20760/2 "2003-05-13T13:19:01Z")

</div>

This is the easiest way that I have found to do it -  
Load and unLoad movies into blank ovie clips for each button.

TD

---

<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:** [May 13, 2003, 8:57pm UTC](https://forum.kirupa.com/t/menu-help/20760/3 "2003-05-13T20:57:42Z")

</div>

That would work, but I have 5 buttons with seperate text, I would need 5 seperated movies. I kno there is a actionscript for this I have seen it b4 :\ I just cant remember 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:** [May 14, 2003, 3:13am UTC](https://forum.kirupa.com/t/menu-help/20760/4 "2003-05-14T03:13:15Z")

</div>

guess no1 has any ideads :\

---

<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:** [May 14, 2003, 5:38pm UTC](https://forum.kirupa.com/t/menu-help/20760/5 "2003-05-14T17:38:59Z")

</div>

Check my attachment… is that what you meant?

---

<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:** [May 14, 2003, 5:46pm UTC](https://forum.kirupa.com/t/menu-help/20760/6 "2003-05-14T17:46:12Z")

</div>

\*\*\*\* ur good…thanks

Only problem is the buttons that the player uses already have an instance name. Check the attachment for the player I made.

---

<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:** [May 14, 2003, 5:46pm UTC](https://forum.kirupa.com/t/menu-help/20760/7 "2003-05-14T17:46:20Z")

</div>

No problem, the AS is pretty straight forward… just a few things to keep in mind…

Unless you edit the script to be something different your buttons must have the instance names button1, button2, button3, button4, and button5 (if you make more than 5 button you will have to edit the i\<=5 in the for loop script so that the 5 is the number of buttons you have).

Your buttons must actually be movie clips, and those movie clips contain 2 frames, Frame 1 being the not pressed state, and frame 2 being the pressed state. You would of course need a stop action at least on Frame 1 so that the clip doesn’t play to start with, but instead stops at Frame 1. I use a gotoAndStop in the script so Frame 2 doesn’t need a stop action, I have no clue why I added it.

Thats about it, everything is else pretty straight forward.

---

<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:** [May 14, 2003, 5:48pm UTC](https://forum.kirupa.com/t/menu-help/20760/8 "2003-05-14T17:48:32Z")

</div>

I see you edited your post: I checked out that .zip file, you need to recreate the buttons to movie clip symbols. You can’t target frames in button symbols, so there isn’t really a way to do what you want to do on a button symbol (that I know of).

So you need to recreate the buttons.

---

<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:** [May 14, 2003, 5:54pm UTC](https://forum.kirupa.com/t/menu-help/20760/9 "2003-05-14T17:54:19Z")

</div>

k I will recreate the buttons, then I can use the instance names that I have set for the buttons already correct? So I can edit ur AS, and change it from

button1.onPress = pressed;  
to  
one.onPress = pressed;

---

<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:** [May 14, 2003, 6:03pm UTC](https://forum.kirupa.com/t/menu-help/20760/10 "2003-05-14T18:03:44Z")

</div>

No… as stated previously…

> \*Originally posted by lostinbeta \*  
> **Unless you edit the script to be something different your buttons must have the instance names button1, button2, button3, button4, and button5 (if you make more than 5 button you will have to edit the i\<=5 in the for loop script so that the 5 is the number of buttons you have).**

Due to using a for loop, unless you store your instance names in an array it would be easier to just give them the instance names button1, button2, etc etc. It’s just an instance name so it’s not really a big deal to change it :sigh:

---

<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:** [May 14, 2003, 6:06pm UTC](https://forum.kirupa.com/t/menu-help/20760/11 "2003-05-14T18:06:16Z")

</div>

Oh and while we are at it… since your buttons also have other actions to run you can do this…

[AS]button1.onPress = function(){  
this.pressed();  
//any other actions here  
}[/AS]

---

<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:** [May 14, 2003, 6:13pm UTC](https://forum.kirupa.com/t/menu-help/20760/12 "2003-05-14T18:13:10Z")

</div>

Alrighty now lets move on a lil further, I found another bump in the road. Your example provided only had 1 movie clip with no text, where I run into the problem is the reverse on the colors. the buttons I have Up, have blue bg and white text, when over they will have a white bg and the blue bg color becomes the text color. Ok, no problem really there, until u change the text from 1 to 2. Then I would need a new movie clip to change the text.

---

<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:** [May 14, 2003, 6:27pm UTC](https://forum.kirupa.com/t/menu-help/20760/13 "2003-05-14T18:27:45Z")

</div>

Create a movie clip symbol for each button. I would say just overlay the text on a new layer above the buttons, but since your text changes colors you should probably create a new symbol for each button. Unless you want to get all textFormatty and stuff.

Actually… for my own interest I want to try it with the text format.

---

<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:** [May 14, 2003, 6:40pm UTC](https://forum.kirupa.com/t/menu-help/20760/14 "2003-05-14T18:40:56Z")

</div>

Here we go, I used the TextFormat object to change the text and dynamic textboxes with a for loop to populate the labels 😉

---

<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:** [May 14, 2003, 6:43pm UTC](https://forum.kirupa.com/t/menu-help/20760/15 "2003-05-14T18:43:55Z")

</div>

nice man, now time to annoy you some more…

ok lets see if I can get a mouseover animation to be the same as the pressed animation.

---

<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:** [May 14, 2003, 8:16pm UTC](https://forum.kirupa.com/t/menu-help/20760/16 "2003-05-14T20:16:30Z")

</div>

hint hint button1.onRollOver = function(){ //do this }

---

<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:** [May 14, 2003, 8:22pm UTC](https://forum.kirupa.com/t/menu-help/20760/17 "2003-05-14T20:22:47Z")

</div>

got it 😉 but, i just relaized something…for my fifth button its a stop button it shouldnt have a 5 but instead a X…_slaps himself_ Hear we go again.

---

<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:** [May 14, 2003, 8:41pm UTC](https://forum.kirupa.com/t/menu-help/20760/18 "2003-05-14T20:41:12Z")

</div>

its called an if statement. If j is equal to 5, have the textbox be an “X” 😉

---

<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:** [May 14, 2003, 10:26pm UTC](https://forum.kirupa.com/t/menu-help/20760/19 "2003-05-14T22:26:37Z")

</div>

now lets see if I can put it all togteher 😉

---

<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:** [May 14, 2003, 10:35pm UTC](https://forum.kirupa.com/t/menu-help/20760/20 "2003-05-14T22:35:15Z")

</div>

Well I got it to work… but this should be easy enough to do on your own, especially since I just told you what to do in English in my last post. All thats left is to convert English to Actionscript 😉

[Next page](https://forum.kirupa.com/t/menu-help/20760.md?page=2)
