Ir para conteúdo
Fórum Script Brasil

Rafael Crespo

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Tudo que Rafael Crespo postou

  1. 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
×
×
  • Criar Novo...