# Setup of a dynamic menu

**URL:** https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149
**Category:** flash
**Created:** [January 27, 2003, 5:36pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149 "2003-01-27T17:36:07Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![cybergold](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cybergold](https://forum.kirupa.com/u/cybergold)
#### Post date: [January 27, 2003, 5:36pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/1 "2003-01-27T17:36:07Z")

</div>

Hey, I am trying to get a rollover on a button where the menu slides in and slides out with the rollover and rolloff. How would i be able to do this, here is an example, [http://www.tshirtsthatsuck.com/ns/index.html](http://www.tshirtsthatsuck.com/ns/index.html)

Any help would be great

---

<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: [January 27, 2003, 5:54pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/2 "2003-01-27T17:54:24Z")

</div>

!!

---

<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: [January 27, 2003, 6:48pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/3 "2003-01-27T18:48:56Z")

</div>

: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: [January 27, 2003, 9:37pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/4 "2003-01-27T21:37:11Z")

</div>

C:-)

---

<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: [January 27, 2003, 9:49pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/5 "2003-01-27T21:49:31Z")

</div>

It isn’t that hard.

Create a movie clip, give it the instance name subMenu1, have the first frame be a stop() action and be empty.

Have frame 2 and on be the animation of the tabs (tabs will be buttons that are tweened down) coming down, with a stop() action on the last frame.

Now go back to the \_root timeline, create your button.

Then on the button add these actions

```auto
on (rollOver){
_root.subMenu1.play();
}

```

Then when you want it cleared out just use \_root.subMenu1.gotoAndStop(1); It takes you back to the empty frame.

---

<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: [January 27, 2003, 10:28pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/6 "2003-01-27T22:28:07Z")

</div>

Works perfectly !! I can use this now to make a window which comes from the side of the screen at the touch of a button, know how i could make it so that when i touch another button, Window A slides out, and Window B slides in? :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: [January 27, 2003, 10:51pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/7 "2003-01-27T22:51:18Z")

</div>

Create a variable that says what window is open.

Like (on the main timeline)…

openWin = “about”

And on your button you could be like…

on (release){  
if (\_root.openWin == “about”){  
\_root.aboutWin.gotoAndPlay(outAnimation);  
\_root.openWin = “links”  
\_root.linksWin.play();  
}

This is if you are closing the about and opening the links.

It is just a quick thing, I am not even sure how well it works…lol.

---

<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: [January 27, 2003, 11:53pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/8 "2003-01-27T23:53:13Z")

</div>

Do you have an example :stunned: I didn’t get that actionscript

---

<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: [January 28, 2003, 3:17am UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/9 "2003-01-28T03:17:02Z")

</div>

Alright I have a fully commented incredibly basic example.

Where you take it from there is up to you 😉

---

<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: [January 28, 2003, 5:12pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/10 "2003-01-28T17:12:52Z")

</div>

Thanks, looks good

---

<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: [January 28, 2003, 5:26pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/11 "2003-01-28T17:26:51Z")

</div>

No problem man.

---

<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: [January 28, 2003, 6:28pm UTC](https://forum.kirupa.com/t/setup-of-a-dynamic-menu/12149/12 "2003-01-28T18:28:08Z")

</div>

or go here [http://www.computerarts.co.uk/tutorials/type/tutorial.asp?id=30426](http://www.computerarts.co.uk/tutorials/type/tutorial.asp?id=30426) and try the tutorial.

Good Luck

Bobby
