Ir para conteúdo
Fórum Script Brasil
  • 0

Menu Rodando Em "3d"


Rafael Crespo

Pergunta

Olá!

Estou tentando fazer um menu "3d" no flash... onde os icones ficam girando como se fosse um carrossel...

o codigo é...

this.createEmptyMovieClip("theScene", 1);

theScene._x = 270;

theScene._y = 50;

objectsInScene = new Array();

spin = 0;

focalLength = 500;

displayPane = function(){

var angle = this.angle - spin;

var x = Math.cos(angle)*this.radius;

var z = Math.sin(angle)*this.radius;

var y = this.y;

var scaleRatio = focalLength/(focalLength + z);

this._x = x * scaleRatio;

this._y = y * scaleRatio;

this._xscale = this._yscale = 125 * scaleRatio;

this._xscale *= Math.sin(angle);

this.swapDepths(Math.round(-z));

}

angleStep = 2*Math.PI/4;

for (i=0; i<4; i++){

if (i==0 ){attachedObj = theScene.attachMovie("circulo", "pane"+i, i);}

if (i==1 ){attachedObj = theScene.attachMovie("circulo", "pane"+i, i);}

if (i==2 ){attachedObj = theScene.attachMovie("circulo", "pane"+i, i);}

if (i==3 ){attachedObj = theScene.attachMovie("circulo", "pane"+i, i);}

attachedObj.angle = angleStep * i;

attachedObj.radius = 210;

attachedObj.x = Math.cos(attachedObj.angle) * attachedObj.radius;

attachedObj.z = Math.sin(attachedObj.angle) * attachedObj.radius;

attachedObj.y = 70;

attachedObj.display = displayPane;

objectsInScene.push(attachedObj);

}

panCamera = function(){

spin += this._xmouse/3000;

for (var i=0; i<objectsInScene.length; i++){

objectsInScene.display();

}

};

theScene.onEnterFrame = panCamera;

foi baseado no tutorial do kirupa...na parte "Merry-go-round of Spinning Images"

http://www.kirupa.com/developer/actionscri...era_panning.htm

............

mas...

estamos querendo colocar uma imagem no meio do circulo... assim os icones que estão atras passarão por trás da imagem...e os icones que estão na frente, passarão na frente da imagem...

o menu do site http://www.xxxperience.com.br/ tem uma solução interessante... eles colocaram uma imagem no meio, e fizeram com que, quanto mais longe os icones ficam, menor a opacidade deles... (também não sabemos fazer isso =P )

Se alguém puder nos ajudar...

Grato desde já

Abraços

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,7k
×
×
  • Criar Novo...