Comunidad de diseño web y desarrollo en internet online

Ayuda Codigo

Citar            
MensajeEscrito el 23 Sep 2008 05:20 pm
HOLA HE DISEÑADO UN FLASH CON 38 FOTOGRAMAS, EN CADA UNO HAY UNA FOTO DISTINTA, ADEMAS LE HE PUESTO DOS BOTONES UNO DE ATRAS Y EL OTRO SIGUIENTE, LO QUE QUIERO HACER ES QUE CADA SEMANA SE ME CARGUE UNA FOTO DISTINTA, O SEA QUE EMPIECE EN UN FRAME DETERMINADO, TENGO ESTE CODIGO QUE UTILIZO

Código :

if (isLoaded == undefined) {
   
   var updateFrame = function (inc) {
      
      var newFrame = _currentframe + inc;
      gotoAndStop(newFrame);
   
      if (_root._currentframe == 1) {
         backBtn._alpha = 0;
         backBtn.enabled = false;
      } else {
         backBtn._alpha = 100;
         backBtn.enabled = true;
      }
      if (_root._currentframe == _root._totalframes) {
         forwardBtn._alpha = 0;
         forwardBtn.enabled = false;
      } else {
         forwardBtn._alpha = 100;
         forwardBtn.enabled = true;   
      }
   }


   // When the forward button is pressed
   forwardBtn.onPress = function () {
      updateFrame(1);
   }

   // When the back button is pressed
   backBtn.onPress = function () {
      updateFrame(-1);
   }

   // When the keyboard keys are pressed
   var keyListener = new Object();
   keyListener.onKeyDown = function () {
      if (Key.isDown(37)) { 
         // Left
         updateFrame(-1);
      } else if (Key.isDown(38)) { 
         // Up
         updateFrame(-(_currentframe-1));
      } else if (Key.isDown(39)) { 
         // Right
         updateFrame(1);
      } else if (Key.isDown(40)) { 
         // Down
         updateFrame(_totalFrames + 1);
      }
   }
   Key.addListener(keyListener);   


   // Call updateFrame at first to get button states correct at start
   updateFrame();   
}

// Set loaded flag to prevent redefinition 
this.isLoaded = true;


YA HE INTENTADO PONIENDOLE UN FRAME A updateFrame () PERO NO ME APARECE, ALGUIEN ME PUEDE AYUDAR?

Por thecapo_10

9 de clabLevel



 

firefox
Citar            
MensajeEscrito el 23 Sep 2008 08:04 pm
estos links te pueden ayudar
lee primero uno y desues el otro
este
y este

Por ironeric23

Claber

407 de clabLevel



Genero:Femenino  

chrome
Citar            
MensajeEscrito el 23 Sep 2008 09:45 pm
No escribas con mayúsculas, es muy mal visto en los foros, porque pareciera que gritaras.
Mira este tuto también, quizás te ayude.

Por elchininet

Claber

3921 de clabLevel

17 tutoriales

Genero:Masculino  

Front-end developer at Booking.com

firefox

 

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