ciao a tutti!
mi trovo in un vicolo cieco!
sto cercando di modificare un menu elastico a spirale per farlo diventare da verticale a orizzontale.
dunque, e' tutto gestito da actionscript, c'e' un solo pulsante nello stage che poi viene moltiplicato a formare il menu.
il problema e' questo, non so come modificare le singole voci di menu ne come dirgli di crearmi solo 5 pulsanti (adesso me ne crea 9)
ecco lo script:
count = 0;
while (count < VerticeNum) {
count ++;
this["z" add count] = Math.cos((count*45) * (math.PI/180)) * 50;
this["y" add count] = Math.sin((count*45) * (math.PI/180)) * 50;
this["x" add count] = (count * 40) - (VerticeNum/2 * 40);
duplicateMovieClip("Vertex", "Vertex" add count, count );
}
duplicateMovieClip("Line", "Vertex10", 100);
setProperty("Vertex", _visible, 0);
setProperty("Line", _visible, 0);
CenterRotationX = 0;
CenterRotationY = 0;
TrailerX = 50;
TrailerY = 360;
// 3d calculation;
function calc3d() {
c = 0;
while (c < VerticeNum + 1) {
c++;
Xang = Xangle * (math.PI/180);
Yang = Yangle * (math.PI/180);
// -----------------------------------------
// --- y rotate ---
// -----------------------------------------
this["zpos" + c] = this["z" + c] * math.cos(Yang) - this["x" + c] * math.sin(Yang);
this["xpos" + c] = this["z" + c] * math.sin(Yang) + this["x" + c] * math.cos(Yang);
// -----------------------------------------
// --- x rotate ---
// -----------------------------------------
this["ypos" + c] = this["y" + c] * math.cos(Xang) - this["zpos" + c] * math.sin(Xang);
this["zpos" + c] = this["y" + c] * math.sin(Xang) + this["zpos" + c] * math.cos(Xang);
// -----------------------------------------
// -- 3d to 2d --
// -----------------------------------------
this["Depth" + c] = (1 / ((this["zpos" + c]/perspective) + 1));
// -----------------------------------------
// --- draw ---
// -----------------------------------------
this["Vertex" + c]._x = this["xpos" + c] * this["Depth" + c] + CenterRotationX;
this["Vertex" + c]._y = this["ypos" + c] * this["Depth" + c] + CenterRotationY;
this["Vertex" + c]._xscale = this["Vertex" + c]._yscale = (this["Depth" + c] / 2) * 500 ;
// -----------------------------------------
// --- Z-Sorting ---
// -----------------------------------------
this["Vertex" + c].swapDepths(this["Depth" + c] * 500);
}
}
// set angle;
function setAngle() {
TrailerY = TrailerY + (NewPosY - TrailerY)/5;
Xangle = TrailerY;
}
nel secondo frame c'e' scritto:
calc3d();
setAngle();
e nel terzo:
prevFrame();
play();
per renderlo verticale ho semplicemente girato di 90° gli oggetti dello stage...
grazie di cuore a tutti quelli che mi aiuteranno!!
a proposito, ovviamente sono disponibile a inviare il fla originale a chi me lo chiedera'...

Rispondi quotando
