Hey all, I’m trying to make a carousel like navigation / panel menu system where it is almost if the user is right “in the way” of the rotation; up close and personal. Each panel will have content on it for the user to select and read. Once selected, it zooms up in a circular, carousel fashion. I’ve put together this code, but I can’t figure out 2 things with it: 1) How would I make more of a perspective where the “selected” panel is scaled up more while the panels in back are further away? Giving it more depth? 2) How do I make the increment value to rotate panel-to-panel? (right now it just shuffles them around to close to each other) Any Help Greatly Appreciated!! Here is the code:
[COLOR=#993300]import[/COLOR] gs.[COLOR=#000000]TweenMax[/COLOR];
[COLOR=#993300]import[/COLOR] gs.[COLOR=#000000]easing[/COLOR].*;
[COLOR=#993300]var[/COLOR] numOfBalls:[COLOR=#993300]Number[/COLOR] = [COLOR=#000000]10[/COLOR];
[COLOR=#993300]var[/COLOR] radiusX:[COLOR=#993300]Number[/COLOR] = [COLOR=#000000]650[/COLOR];
[COLOR=#993300]var[/COLOR] radiusY:[COLOR=#993300]Number[/COLOR] = [COLOR=#000000]50[/COLOR];
[COLOR=#993300]var[/COLOR] centerX:[COLOR=#993300]Number[/COLOR] = -[COLOR=#000000]10[/COLOR];
[COLOR=#993300]var[/COLOR] centerY:[COLOR=#993300]Number[/COLOR] = [COLOR=#000000]150[/COLOR];
[COLOR=#993300]var[/COLOR] increment:[COLOR=#993300]Number[/COLOR] = [COLOR=#000000]0[/COLOR].[COLOR=#000000]05[/COLOR];
[COLOR=#993300]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#993300]var[/COLOR] i = [COLOR=#000000]0[/COLOR]; i < numOfBalls; i++[COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#993300]var[/COLOR] t = [COLOR=#993300]this[/COLOR].[COLOR=#993300]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]“ball”[/COLOR], [COLOR=#0000FF]“b”[/COLOR] + i, i + [COLOR=#000000]1[/COLOR][COLOR=#000000])[/COLOR];
t.[COLOR=#000000]angle[/COLOR] = i * [COLOR=#000000]([/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]Math[/COLOR].[COLOR=#993300]PI[/COLOR] /[COLOR=#000000]2[/COLOR][COLOR=#000000])[/COLOR] / numOfBalls[COLOR=#000000])[/COLOR];
moverCOLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#993300]function[/COLOR] mover[COLOR=#000000]([/COLOR]which, increment[COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#F000F0]//trace(which + “,” + increment);[/COLOR]
currX = [COLOR=#993300]Math[/COLOR].[COLOR=#993300]cos[/COLOR]COLOR=#000000[/COLOR] * radiusX + centerX;
currY = [COLOR=#993300]Math[/COLOR].[COLOR=#993300]sin[/COLOR]COLOR=#000000[/COLOR] * radiusY + centerY;
[COLOR=#993300]var[/COLOR] s = currY / [COLOR=#000000]([/COLOR]centerY + radiusY[COLOR=#000000])[/COLOR] / [COLOR=#000000]2[/COLOR];
currXscale = currYscale = s * [COLOR=#000000]460[/COLOR] / [COLOR=#000000]2[/COLOR];
which.[COLOR=#000000]angle[/COLOR] += increment;
which.[COLOR=#993300]swapDepths[/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]Math[/COLOR].[COLOR=#993300]round[/COLOR]COLOR=#000000[/COLOR] + [COLOR=#000000]100[/COLOR][COLOR=#000000])[/COLOR];
TweenMax.[COLOR=#000000]to[/COLOR][COLOR=#000000]([/COLOR]which,.[COLOR=#000000]5[/COLOR],[COLOR=#000000]{[/COLOR][COLOR=#993300]_x[/COLOR]:currX, [COLOR=#993300]_y[/COLOR]:currY, [COLOR=#993300]_xscale[/COLOR]:currXscale, [COLOR=#993300]_yscale[/COLOR]:currYscale, [COLOR=#993300]_alpha[/COLOR]:currY / [COLOR=#000000]2[/COLOR], ease:Strong.[COLOR=#000000]easeOut[/COLOR][COLOR=#000000]}[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
next_btn.[COLOR=#993300]onRelease[/COLOR] = [COLOR=#993300]function[/COLOR]COLOR=#000000[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#993300]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#993300]var[/COLOR] i = [COLOR=#000000]0[/COLOR]; i < numOfBalls; i++[COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#993300]var[/COLOR] clip = [COLOR=#993300]_root[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000FF]“b”[/COLOR] + i[COLOR=#000000]][/COLOR];
mover[COLOR=#000000]([/COLOR]clip,[COLOR=#000000]([/COLOR]centerX + [COLOR=#000000]150[/COLOR][COLOR=#000000])[/COLOR] / [COLOR=#000000]1200[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR];
prev_btn.[COLOR=#993300]onRelease[/COLOR] = [COLOR=#993300]function[/COLOR]COLOR=#000000[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#993300]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#993300]var[/COLOR] i = [COLOR=#000000]0[/COLOR]; i < numOfBalls; i++[COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#993300]var[/COLOR] clip = [COLOR=#993300]_root[/COLOR][COLOR=#000000][[/COLOR][COLOR=#0000FF]“b”[/COLOR] + i[COLOR=#000000]][/COLOR];
mover[COLOR=#000000]([/COLOR]clip,[COLOR=#000000]([/COLOR]centerX - [COLOR=#000000]150[/COLOR][COLOR=#000000])[/COLOR] * [COLOR=#000000]2000[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR];