PDA

View Full Version : [MX] Resizing Menu Items Using _xmouse



iamapathy
March 1st, 2003, 12:25 AM
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?

iamapathy
March 3rd, 2003, 03:13 PM
come on, anyone?

lostinbeta
March 3rd, 2003, 03:33 PM
http://www.flashkit.com/tutorials/Actionscripting/Expert/Building-Morten_B-529/index.php

iamapathy
March 3rd, 2003, 05:40 PM
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

lostinbeta
March 3rd, 2003, 06:19 PM
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.

iamapathy
March 5th, 2003, 12:39 PM
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.

lostinbeta
March 5th, 2003, 01:12 PM
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 :)

iamapathy
April 28th, 2003, 01:07 PM
hey lostinbeta hows the updated version going?

lostinbeta
April 28th, 2003, 02:29 PM
Wow, I completely forgot about this... after all it was 2 MONTHS AGO!!!...lol.

Well.. check my attachment... hopefully it will help.

iamapathy
April 28th, 2003, 08:18 PM
cool, thanks.

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

prototypes are so useful. :)

lostinbeta
April 28th, 2003, 11:38 PM
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

iamapathy
April 30th, 2003, 03:57 PM
well at first i thought i got it, but after reading the tutorial im lost again...

hmm...

monkeygirl
April 30th, 2003, 06:44 PM
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!

lostinbeta
April 30th, 2003, 07:59 PM
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...
//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();

monkeygirl
May 1st, 2003, 12:42 AM
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

lostinbeta
May 1st, 2003, 12:46 AM
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 :)