[MX] Resizing Menu Items Using _xmouse

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

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:

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?

come on, anyone?

http://www.flashkit.com/tutorials/Actionscripting/Expert/Building-Morten_B-529/index.php

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

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.

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.

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

hey lostinbeta hows the updated version going?

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

Well… check my attachment… hopefully it will help.

cool, thanks.

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

prototypes are so useful. :slight_smile:

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

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

hmm…

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!

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();
button1.scale();
button2.scale();
button3.scale();
button4.scale();
button5.scale();
button6.scale();
button7.scale();
button8.scale();
button9.scale();
button10.scale();[/AS]

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

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