Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apple docked menu fx 1

Status
Not open for further replies.

georgyboy

IS-IT--Management
Oct 20, 2002
197
AU
does anyone know how i would go about developing a navigation movie thats similiar to the fx that apple has on OSX 10.2 - i like the way it bulges out, etc
 

Here's the code:

//set up values
top=spacer = 24;
left = 20;
right = 100;
bottom = 370;
icons = 15;
maximum = 200;
minimum = 100;
speed = 3;

//place menu items on stage
for (var i = 1; i<icons; i++) {
this.attachMovie('icon', &quot;icon&quot;+i, i);
clip = this[&quot;icon&quot;+i];
clip._x = left;
clip._y = i*spacer;
clip._alpha = 50;
}

function detectMouse() {
if (_xmouse<right && _xmouse>left && _ymouse>top && _ymouse<bottom) {
i = 1;
while (i<=icons) {
clip = this[&quot;icon&quot;+i];
iconSize = maximum-Math.abs(clip._y-_ymouse);
if (iconSize<minimum) {
iconSize = minimum;
}
clip._xscale = clip._yscale = iconSize;
clip._alpha = iconSize-50;
i++;
}
}
}

function resetMenu() {
for (var i = 1; i<icons; i++) {
clip = this[&quot;icon&quot;+i];
if (minimum<clip._xscale) {
clip._xscale -= speed;
clip._yscale -= speed;
clip._alpha -= speed;
}
}
}

//run functions
this.onEnterFrame = function() {
detectMouse();
resetMenu();
};

stop();
 
hi wangbar, thanks for the great info. I have tried over the last month or so to try and use the code but i have no idea where to place it,etc if u could help me out that would be great.
thanks
 
Have you tried it on the first frame of your movie?

Do you have an &quot;icon&quot; movie clip on stage or even in your Library?

Regards,

cubalibre2.gif
 
i made the movieclip which is holding the 5 buttons and called it 'icon' put on stage and am still having no luck, what am i doing??
do u know of nay tutorials that might help me out here??
thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top