Comunidad de diseño web y desarrollo en internet online

Preloader de imajenes externas

Citar            
MensajeEscrito el 19 Dic 2007 08:26 pm
Hola a todos buenos dias (tardes o noches : depende de cuando lo lean) tengo un problemilla con un preloader que carge imajenes de tipo jpg, aqui les dejo el codigo que he estado usando, no estoy seguro si sea este o si este bien y en caso de que este mal porfavor diganme en que esta mal y si no es este diganme cual es.


Como siempre muchas gracias, nos vemos y que pasen feizes fiestas.

Código :

// initialize variables and properties

square8._alpha = 0;

whichPic = 1;

// initiate change to new image when buttons are clicked

next.onPress = function() {

            if (whichPic<15 && !fadeIn && !fadeOut) {

                        fadeOut = true;

                        whichpic++;

                        input = whichPic;

            }

};

back.onPress = function() {

            if (whichPic>1 && !fadeIn && !fadeOut) {

                        fadeOut = true;

                        whichpic--;

                        input = whichPic;

            }

};

_root.onEnterFrame = function() {

            // when a new Photo is selected, fade out, load new image, and fade in

            if (square8._alpha>10 && fadeOut) {

                        square8._alpha -= 10;

            }

            if (square8._alpha<10) {

                        loadMovie("images/fam/fam"+whichPic+".jpg", "square8");

                        fadeOut = false;

                        fadeIn = true;

            }

            if (square8._alpha<100 && fadeIn && !fadeOut) {

                        square8._alpha += 10;

            } else {

                        fadeIn = false;

            }

            // limit input field

            if (input>15) {

                        input = 15;

            }

            // initiate change to new image when Enter key is pressed

            if (Key.isDown(Key.ENTER)) {

                        fadeOut = true;

                        whichpic = input;

            }

};

// if a number is entered in the input field but Enter is not pressed, change

// back to current Photo number when clicking anywhere else

inputField.onKillFocus = function() {

            input = whichPic;

};

Por kirby07

20 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 20 Dic 2007 12:12 am

Por penHolder

Claber

4661 de clabLevel

39 tutoriales
2 articulos

Genero:Masculino   Premio_Secretos

| mdz |

firefox

 

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