Comunidad de diseño web y desarrollo en internet online

¿preloader mc biblioteca, para galeria de imag?

Citar            
MensajeEscrito el 02 Feb 2007 10:34 am
Hola a todos...
Bueno... Os cuento... Estoy haciendo una página que tiene una galería de imágenes. Cuando picas en el botón, te carga una imagen exterior, que carga con Fade in, y sale con Fade out a través de un código de actionscript.
Pues, no se que hacer para que cargue con un preloader de un mc de la Biblioteca.
Comprendo algo de AS, pero no soy ningún genio...
Alguien puede me ayudar? Aquí os pongo el AS.




X = 0;
Y = 122;
var contenedor_mc:MovieClip = this.createEmptyMovieClip("contenedor", 2);
_level1.contenedor._x = X;
_level1.contenedor._y = Y;
var control_mc:MovieClip = this.createEmptyMovieClip("control", 3);
var ft_mc:MovieClip = this.createEmptyMovieClip("ficha", 6);
bot=teste;
ft=ftec;
this.ficha.Loadmovie(ftec);
this.b_01.loadMovie(teste+"1"+".jpg");
this.b_02.loadMovie(teste+"2"+".jpg");
this.b_03.loadMovie(teste+"3"+".jpg");
this.b_04.loadMovie(teste+"4"+".jpg");
d = bot1;
contenedor._alpha = 0;
carga(d);
function carga(img) {
contenedor.loadMovie(img);
control.onEnterFrame = function() {
if (contenedor.getBytesLoaded=contenedor.getBytesTotal()) {
encender(contenedor);
delete control.onEnterFrame;
}
};
}
function encender(mc) {
mc.onEnterFrame = function() {
if (contenedor._alpha<100) {
contenedor._alpha += 15;
if (contenedor._alpha>=100) {
contenedor._alpha = 100;
delete contenedor.onEnterFrame;
}
}
};
}
function apagar(mc) {
mc.onEnterFrame = function() {
if (contenedor._alpha>0) {
contenedor._alpha -= 15;
if (contenedor._alpha<=0) {
contenedor._alpha = 0;
delete contenedor.onEnterFrame;
carga(d);
}
}
};
}
boton1.onRelease = function() {
d = bot1;
apagar(contenedor);
this.enabled = false;
boton2.enabled = true;
boton3.enabled = true;
boton4.enabled = true;
boton5.enabled = true;
};
boton2.onRelease = function() {
d = bot2;
apagar(contenedor);
this.enabled = false;
boton1.enabled = true;
boton3.enabled = true;
boton4.enabled = true;
boton5.enabled = true;
};
boton3.onRelease = function() {
d = bot3;
apagar(contenedor);
this.enabled = false;
boton1.enabled = true;
boton2.enabled = true;
boton4.enabled = true;
boton5.enabled = true;
};
boton4.onRelease = function() {
d = bot4;
apagar(contenedor);
this.enabled = false;
boton1.enabled = true;
boton2.enabled = true;
boton3.enabled = true;
boton5.enabled = true;
};
boton5.onRelease = function() {
this.enabled = false;
boton1.enabled = true;
boton2.enabled = true;
boton3.enabled = true;
boton4.enabled = true;
ficha.gotoAndPlay(2);
};

Por garoudo

2 de clabLevel



Genero:Masculino  

msie7
Citar            
MensajeEscrito el 02 Feb 2007 11:47 am
se agradece la rapida respuesta :)

Por garoudo

2 de clabLevel



Genero:Masculino  

msie7

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.