# \[MX\] Resizing Menu Items Using \_xmouse

**URL:** https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676
**Category:** flash
**Created:** [March 1, 2003, 5:25am UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676 "2003-03-01T05:25:52Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![iamapathy](https://avatars.discourse-cdn.com/v4/letter/i/ac8455/32.png) [@iamapathy](https://forum.kirupa.com/u/iamapathy)
#### Post date: [March 1, 2003, 5:25am UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/1 "2003-03-01T05:25:52Z")

</div>

I was wondering if any one knew how to create a menu similar to the MacOS X dock or like the green text column here [http://www.fox.com/24/season1/guide.html](http://www.fox.com/24/season1/guide.html)

i made one but it goes really weird and jumpy after certain numbers.

i made a MC in an MC on the stage with the MC code:

```auto
onClipEvent (enterFrame) {
	if (_parent._xmouse<100 and _parent._xmouse>0){
		_xscale = 100-_xmouse
		_yscale = 100-_xmouse
	} else if (_parent._xmouse>-100 and _parent._xmouse<0){
		_xscale = 100+_xmouse
		_yscale = 100+_xmouse
	}
}

```

i put some restraits on it, so it doesnt go extrememly small, but anyways any suggestions?

---

<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: [March 3, 2003, 8:13pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/2 "2003-03-03T20:13:34Z")

</div>

come on, anyone?

---

<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: [March 3, 2003, 8:33pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/3 "2003-03-03T20:33:45Z")

</div>

[http://www.flashkit.com/tutorials/Actionscripting/Expert/Building-Morten\_B-529/index.php](http://www.flashkit.com/tutorials/Actionscripting/Expert/Building-Morten_B-529/index.php)

---

<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: [March 3, 2003, 10:40pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/4 "2003-03-03T22:40:40Z")

</div>

that tutorial is only for text, though. is there a way to do it with movie clips?

sorry i guess i should have clarified that, but thanks

---

<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: [March 3, 2003, 11:19pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/5 "2003-03-03T23:19:07Z")

</div>

That text is inside a movie clip symbol. For scaling it HAS to be a movie clip symbol. So it could be anything you want other than 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: [March 5, 2003, 5:39pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/6 "2003-03-05T17:39:35Z")

</div>

dammit i feel dumb, i should have opened the fla first before replying.

thanks lostinbeta.

the only thing is the scripting is over my head, im only getting used to the drawing methods, and the use of parabolas. anyways once again thanks.

---

<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: [March 5, 2003, 6:12pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/7 "2003-03-05T18:12:20Z")

</div>

After skimming the tutorial really fast I see that code is extremely outdated.

I will work on a more updated version of it in a little bit. I am kind of interested in it too 🙂

---

<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: [April 28, 2003, 5:07pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/8 "2003-04-28T17:07:37Z")

</div>

hey lostinbeta hows the updated version going?

---

<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: [April 28, 2003, 6:29pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/9 "2003-04-28T18:29:02Z")

</div>

Wow, I completely forgot about this… after all it was 2 MONTHS AGO!!!..lol.

Well… check my attachment… hopefully it will help.

---

<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: [April 29, 2003, 12:18am UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/10 "2003-04-29T00:18:07Z")

</div>

cool, thanks.

its a bonus because by looking at the code, i now understand prototypes.

prototypes are so useful. 🙂

---

<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: [April 29, 2003, 3:38am UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/11 "2003-04-29T03:38:50Z")

</div>

Well theres a difference between a prototype and a function just in case you didn’t know. You can read up on that here…

[http://www.kirupa.com/developer/actionscript/tricks/prototypes.asp](http://www.kirupa.com/developer/actionscript/tricks/prototypes.asp)

---

<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: [April 30, 2003, 7:57pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/12 "2003-04-30T19:57:43Z")

</div>

well at first i thought i got it, but after reading the tutorial im lost again…

hmm…

---

<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: [April 30, 2003, 10:44pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/13 "2003-04-30T22:44:44Z")

</div>

hi  
this is soemthing that i’m interested in as well  
i see that in the fla file provided, the individual buttons are all instances of the same button mc…so how do i make it so that each button is unique? for example, if i want to use the word “home” for one of the buttons and “profile” for the other?  
thanks!

---

<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: [April 30, 2003, 11:59pm UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/14 "2003-04-30T23:59:45Z")

</div>

The buttons have to be movie clips for this (or you can use a button symbol inside a movie clip if need be).

Then give each of the movie clips an instance name…

Then modify this part of the script to target the correct clips…  
[AS]//set the scale prototype to each of your buttons  
[//instancename.prototypename](https://instancename.prototypename)();  
button1.scale();  
button2.scale();  
button3.scale();  
button4.scale();  
button5.scale();  
button6.scale();  
button7.scale();  
button8.scale();  
button9.scale();  
button10.scale();[/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 1, 2003, 4:42am UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/15 "2003-05-01T04:42:16Z")

</div>

whoo hoo! it’s working!  
lostinbeta you’re amazing! the code is simple (especially compared to all these other ones i’ve been looking at) and clean and not too difficult to understand…wow…i’m one happy flasher…=D

---

<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 1, 2003, 4:46am UTC](https://forum.kirupa.com/t/mx-resizing-menu-items-using--xmouse/14676/16 "2003-05-01T04:46:14Z")

</div>

I am glad everything worked out for you =) And yeah, Ive seen some menus out there that are similar and contain like 3 frames full of AS that loop around to create the effect. Screw that!.. lol… so I took something I did before, modified it a bit and voila, a much easier method of doing this 🙂
