Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/07/2011, 18:36
Avatar de bathory84
bathory84
 
Fecha de Ingreso: junio-2010
Ubicación: Venezuela
Mensajes: 257
Antigüedad: 13 años, 10 meses
Puntos: 1
Respuesta: Crear un Menu Carrusel en Flash

Bueno muchachos no levanten todos la mano jajajaja, ya conseguí el codigo para quien lo necesite aqui les dejo los Datos:

Este caso lo voy hacer con 6 iconos o imagenes de su preferencia en el menú carrusel. Abrir un Documento en Flash AS2 y agregar en la Biblioteca 6 Movie Clips con el nombre de pelicula1, pelicula2, pelicula3, pelicula4, pelicula5, pelicula6.

Luego entrar en las Propiedades Avanzadas de cada Movie Clip y Seleccionar las Opciones "Exportar para ActionScript" y "Exportar en primer potograma".

Luego en la Linea de tiempo en el Primer Fotograma colocar el siguiente código:

var numPeliculas:Number = 6;
var radioX:Number = 150;
var radioY:Number = 70;
var centrarX:Number = Stage.width / 2 + 30;
var centrarY:Number = Stage.height / 2;
var velocidad:Number = 0.02;

for(var i=0;i<numPeliculas;i++){
var t = this.attachMovie("pelicula"+(i+1), "p"+i, i+1);
t.angle = i * ((Math.PI * 2) / numPeliculas);
t.onEnterFrame = mover;
}

function mover(){
this._x = Math.cos(this.angle) * radioX + centrarX;
this._y = Math.sin(this.angle) * radioY + centrarY;
var s = this._y /(centrarY+radioY);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.velocidad;
this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function(){
velocidad = (this._xmouse-centrarX) / 1500;
}

Esto es todo para hacer funcionar un Menú Carrusel. Esta es mi primera publicación.. Espero que les sirva.