Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/04/2007, 22:21
litwo
 
Fecha de Ingreso: julio-2006
Mensajes: 2
Antigüedad: 17 años, 9 meses
Puntos: 0
problemas con disminuir alpha

hola!

un saludo muy cordial a todos

estoy aqui con un problema de en actionscript lo que pasa es lo siguiente:

tengo una galaria de imagenes en flash y xml, las imagenes me cargan bien, no hay ningun tipo de problema con eso, el problema es que le he dado una acccion a cada boton del menu de imagenes
los botones son una serie de numeros de la siguiente forma |1|2|3|4|5|6|7|8|..... y asi dependiendo del numero de nodos que hay en el archivo xml.
a la hora de pasar mi cursor por encima de estos botones me crea un clip de pelicula por cada boton y a la hora de apartar mi corsor sobre el boton este clip de pelicula va perdiendo su alpha hasta llegar el punto de desaparecer.
este clip de pelicula es un thumbnails no se como se dice en espanol, en fin es como una imagen que se cargar dentro del boton.

ahora cuando hago el test movie o provar pelicula el se ejecuta super bien, pero a la hora de poner el swf sobre un navegador muchas veces este thumbnails, imagne o clip de pelicula se me queda congelada sobre el boton y no me hace la action de disminuir el alpha de dicho clip de pelicula, esto no susede en todos los botones y tampoco sucede en un boton especifico solo sucede en cualquier momento que se pasa el cursor sobre el boton un de los botones.


si alguien me puede dar un explicacion logica sobre esto algo que estoy pasando por alto o algo que no estoy teniendo en cuenta, la verdad solo hace un mes estoy con este lenguaje de programacion

aqui posteo el codigo:



formato = new TextFormat();
formato.font = 'Gill Sans';
formato.size =15;
formato.color=0x000000;

formato1 = new TextFormat();
formato1.font = 'Gill Sans Light';
formato1.size = 30;
formato1.bold=100;
formato1.color=0x000001;



//objeto de la clase XML
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function() {
//cantidad de nodos en el archivo XML
numimages = this.firstChild.childNodes.length;



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

var position=i*10;

this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = _root.createEmptyMovieClip("thumbnail"+i, i);

this.thumbHolder.createEmptyMovieClip("mc_thumb", i);

this.thumbHolder._x = position+90;
this.thumbHolder._y=495;
this.thumbHolder._xscale=50;
this.thumbHolder._yscale=50;
this.thumbHolder.mc_thumb.createTextField("label2_ txt", i, 3, -7, 5, 5);
this.thumbHolder.mc_thumb.createTextField("label_t xt", i, 1, 1, 5, 5);
numero=1+i;
this.thumbHolder.mc_thumb.label_txt.text=numero;
this.thumbHolder.mc_thumb.label2_txt.text=" |";
this.thumbHolder.mc_thumb.label_txt.autoSize=true;
this.thumbHolder.mc_thumb.label2_txt.autoSize=true ;
this.thumbHolder.mc_thumb.label_txt.setTextFormat( formato);
this.thumbHolder.mc_thumb.label2_txt.setTextFormat (formato1);
//trace(this.thumbHolder._x);

//atributo del thumbnial del archivo xml
this.thumbHolder.thmb = this.picHolder.attributes.thmb;
//atributo del titulo de la imagen del archivo xml
this.thumbHolder.title = this.picHolder.attributes.title;
//atributo de la imagen original que se mostrara en MC loader
this.thumbHolder.main = this.picHolder.attributes.main;

//inicia la carga de la primera foto de la primera imagen
_root.loader.createEmptyMovieClip("imagen",1);
_root.loader.imagen._xscale=60;
_root.loader.imagen._yscale=60;
_root.loader.imagen.loadMovie(this.firstChild.chil dNodes[0].attributes.main);
_root.title_txt.text=this.firstChild.childNodes[0].attributes.title;

//trace (this.thumbHolder);
//numero de nodos que se encuentran en archivo xml
//aqui onRollOver
this.thumbHolder.onRollOver = function(){
//this.mc_thumb.removeMovieClip();
this.loadthumb=this.createEmptyMovieClip("imagenlo ad", 2);
//INSTANCIA DONDE SE CARGARA EL THUMBNAIL
this.loadthumb.loadMovie(this.thmb);
this.loadthumb._xscale=15;
this.loadthumb._yscale=15;
this.loadthumb._alpha=100;
//this.loadthumb._x=88+this._x*2.16;
this.loadthumb._y=-70;
};


//onrollOut
this.thumbHolder.onRollOut=function(){
//var valoralpha=this.loadthumb._alpha;

//trace(this);
this.loadthumb.onEnterFrame=function()
{
this._alpha-=10;
if(this._alpha<-20)
{
delete this.onEnterFrame;
this.removeMovieClip();
}
};

};


//onRelease sobre cada thumbnail
this.thumbHolder.onRelease = function() {
var valoralpha=_root.loader.imagen._alpha;
var valorMain=this.main
_root.loader.imagen.onEnterFrame=function(){
this._alpha=valoralpha;
valoralpha=valoralpha-5;
if(valoralpha==0)
{
this.loadMovie(valorMain);
for(var i=0;i<=100; i++)
{
this._alpha=i;
}
//delete this.onEnterFrame;

}


}
//_root.loader.imagen.loadMovie(this.main);
title_txt.text = this.title;
};

}//cierra loop for






};//cierra funcion
myPhoto.load("xmlphoto.xml");

_root.botonmenu.onRelease=function(){
getURL("principal.html", "_self", "POST");
}


y este es el xml:



<gallery>
<image title="Photo Number One" main="images/photo1.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number two" main="images/photo2.jpg" thmb="thumbnails/photo2.jpg"/>
<image title="photo number three" main="images/photo3.jpg" thmb="thumbnails/photo3.jpg"/>
<image title="photo number four" main="images/photo4.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number five" main="images/photo5.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number six" main="images/photo6.jpg" thmb="thumbnails/photo2.jpg"/>
<image title="photo number seven" main="images/photo1.jpg" thmb="thumbnails/photo3.jpg"/>
<image title="photo number eight" main="images/photo2.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number nane" main="images/photo3.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number ten" main="images/photo4.jpg" thmb="thumbnails/photo2.jpg"/>
<image title="photo number eleven" main="images/photo5.jpg" thmb="thumbnails/photo3.jpg"/>
<image title="photo number twelve" main="images/photo6.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number one" main="images/photo1.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number one" main="images/photo2.jpg" thmb="thumbnails/photo2.jpg"/>
<image title="photo number one" main="images/photo3.jpg" thmb="thumbnails/photo3.jpg"/>
<image title="photo number one" main="images/photo4.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number one" main="images/photo5.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number one" main="images/photo6.jpg" thmb="thumbnails/photo2.jpg"/>
<image title="photo number one" main="images/photo1.jpg" thmb="thumbnails/photo3.jpg"/>
<image title="photo number one" main="images/photo2.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number one" main="images/photo3.jpg" thmb="thumbnails/photo1.jpg"/>
<image title="photo number one" main="images/photo4.jpg" thmb="thumbnails/photo2.jpg"/>
</gallery>



gracias muchachos por todo y suerte

recuerden esto solo sucede cuando el swf esta sobre el navegador.



bye again