Foros del Web » Creando para Internet » Flash y Actionscript »

crear un carrusel de imagenes

Estas en el tema de crear un carrusel de imagenes en el foro de Flash y Actionscript en Foros del Web. Hola... bueno, ando trabajando en un proyecto de web y la verdad el actioscrip no es mi fortaleza, pero lo intento. Ya tengo el carrusel ...
  #1 (permalink)  
Antiguo 11/04/2013, 13:34
 
Fecha de Ingreso: abril-2013
Mensajes: 1
Antigüedad: 11 años
Puntos: 0
crear un carrusel de imagenes

Hola... bueno, ando trabajando en un proyecto de web y la verdad el actioscrip no es mi fortaleza, pero lo intento.

Ya tengo el carrusel establecido, pero no logro conseguir que cada imagen sea un botón y que me lleve a una escena establecida para cada boton, ademas cuando activo otros botones que no están en el carrusel y que funcionan correctamente, en la escena a la que llevan, también se sigue viendo el carrusel de imagenes y se supone que no debería ser así,, agradezco si pueden revisar el código y si saben como corregir esto me lo hagan saber. Gracias

pos.. el codigo es de un tutorial pero lo he modificado

Codigo:



stop();

var total:Number = 6;

var label_list:Array = new Array("Casquetes", "Hebillas", "Ojaletes", "Apliques", "Botón Integrado", "Maquinas y Troqueles");

var link_list = new Array("Botones para forrar HB ó TAPICERIA, con Perforados, con Aro, con Ojaletes ó Broche", "Hebilla para Forrar, Hebilla Vaquera y Hebilla Metálica", "Ojaletes con Arandela", "Aplique Plano, Redondo y Cónico", "Botón Integrado y Gancho Pantalón", "Maquinas y Troqueles");

var radiusX:Number = 330;
var radiusY:Number = 90;
var centerX:Number = 500;
var centerY:Number = 400;
var speed:Number = 0.005;
tn_group_mc._visible = false;
info.text = ""; fm_label.text = "";

for( var i = 0; i < total; i++)
{
var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
t.tn_mc.gotoAndStop(i+1); t.tn_shadow_mc.gotoAndStop(i+1);
t.fm_label = label_list[i];
t.fm_link_list = link_list[i];


t.angle = i * ((Math.PI*2)/total);
t.onEnterFrame = mover;
}
{
btn_casq.onRollOver = function()
{
fm_label.text = "Línea: " + this._parent.fm_label;
info.text = "Info: " + this._parent.fm_link_list;
}
btn_casq.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
btn_casq.onRelease = function()
{
gotoAndPlay("casquetes", 1);
}

btn_heb.onRollOver = function()
{
fm_label.text = "Línea: " + this._parent.fm_label;
info.text = "Info: " + this._parent.fm_link_list;
}
btn_heb.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
btn_heb.onRelease = function()
{
gotoAndPlay("hebillas", 1);
}

btn_ojal.onRollOver = function()
{
fm_label.text = "Línea: " + this._parent.fm_label;
info.text = "Info: " + this._parent.fm_link_list;
}
btn_ojal.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
btn_ojal.onRelease = function()
{
gotoAndPlay("ojaletes", 1);
}

btn_apl.onRollOver = function()
{
fm_label.text = "Línea: " + this._parent.fm_label;
info.text = "Info: " + this._parent.fm_link_list;
}
btn_apl.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
btn_apl.onRelease = function()
{
gotoAndPlay("apliques", 1);
}

btn_inte.onRollOver = function()
{
fm_label.text = "Línea: " + this._parent.fm_label;
info.text = "Info: " + this._parent.fm_link_list;
}
btn_inte.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
btn_inte.onRelease = function()
{
gotoAndPlay("btn integrado", 1);
}

btn_maq.onRollOver = function()
{
fm_label.text = "Línea: " + this._parent.fm_label;
info.text = "Info: " + this._parent.fm_link_list;
}
btn_maq.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
btn_maq.onRelease = function()
{
gotoAndPlay("maquinas", 1);
}
}

function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX) * 0.0001;
}

Etiquetas: as2.0, flash
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:57.