Comunidad de diseño web y desarrollo en internet online

ayuda con xml galeria

Citar            
MensajeEscrito el 05 Abr 2009 10:10 pm
buenas tardes señores ahora aki mi nuevo problema es el siguiente estoy ahciendo una galeria con xml la habia hecho con action script k llamara a las imagenes en una carpeta thumb y img pero hora lo hago por medio de xml aki les dejo el codigo y vean cual es mi problema

Código ActionScript :

-------------------------------------CODIGO K SI FUNCIONA -----------------------------------------------

for(i = 0; i < 10; i++){
   var mcs:MovieClip = thumb_mc.duplicateMovieClip("mc" + i, i);
   //mcs._x = 150*dirX + 50;
   //mcs._y = 100*dirY + 5;
   new Tween(mcs, "_x", Elastic.easeInOut, 0, 150*dirX + 50, 3, true);
   new Tween(mcs, "_y", Elastic.easeInOut, 0, 100*dirY + 5, 3, true);
   dirX++;
   if(dirX == col){
      dirX = 0;
      dirY++;
   }
   cargarPrevias();
   verFoto()
   mcs.onRollOver = RollOver;
}

function RollOver(){
   TransitionManager.start(this, {type:Photo, direction:Transition.IN, duration: 1, easing:Strong.easeOut});
}


function verFoto(){
   var num:Number = i;
   var img:MovieClip = foto_mc.createEmptyMovieClip("j", this.getNextHighestDepth());
   mcs.onPress = function(event){
      foto_mc._visible = true;
      foto_mc.swapDepths(mcs.getNextHighestDepth());
      TransitionManager.start(foto_mc, {type:Zoom, direction:Transition.IN, duration: 1, easing:Strong.easeOut});

      imgloader.loadClip("img/0"+ num +".jpg", img);
------------------------------------------------------------------------------------------------------------------------------------------
ESTE CODIGO SI FUNCIONA SI SE FIJAN LAS IMAGENES THUMB Y IMG TRAIN EFECTOS AHORA LES DEJO EL CODIGO K NO ME FUNCIONA KIERO HACER K LAS THUMB Y LAS IMG TENGAN LOS MISMOS EFECTOS K EN EL CODIGO K LE ESTOY PASANDO YA LES PUSE this,  foto_mc YA LE MODIFICKE PERO NO FUNCIONA PORFAVOR ALGUIEN K EM AYUDE  

----------------------------CODIGO K NO FUNCIONA--------------------------------------------------
function alCargar(){
   numFotos = xml.firstChild.childNodes.length;
   //trace(numFotos);
   cadaFoto = new Array(numFotos);   
   cargarPrevias();
}
function RollOver(){
   TransitionManager.start(thumb, {type:Photo, direction:Transition.IN, duration: 1, easing:Strong.easeOut});
}

function cargarPrevias(){
   for(i = 0; i < numFotos; i++){
      Duplicar();
      cadaFoto[i] = xml.firstChild.childNodes[i].attributes.nom_xml;
      //trace(cadaFoto[i]);
      thumb = mcs.createEmptyMovieClip("n", this.getNextHighestDepth());
      thumbloader.loadClip("thumb/" + cadaFoto[i], thumb);      
   }
}


function Duplicar(){
   mcs = thumb_mc.duplicateMovieClip("mc"+ i, i);
   mcs._x = 150*dirX + 50;
   mcs._y = 100*dirY + 5;
   dirX++;
   if(dirX == col){
      dirX = 0;
      dirY++;
   }
   verFotos(i);
}

function verFotos(num:Number){
   img = foto_mc.createEmptyMovieClip("j", this.getNextHighestDepth());
   mcs.onPress = function(){
      foto_mc._visible = true;
      foto_mc.swapDepths(mcs.getNextHighestDepth());
      TransitionManager.start(foto_mc, {type:Zoom, direction:Transition.IN, duration: 1, easing:Strong.easeOut});
      imgloader.loadClip("img/" + cadaFoto[num], img);
   }
   cerrarFoto();
}

function cerrarFoto(){
   foto_mc.onPress = function(){
      foto_mc._visible = false;
   }
}

---------------------------------------------------------------------------------------------------------------------------------------------------
POR FAVOR SI ALGUIEN ME PUDIERA AYUDAR POR FAVOR SE LO AGRADECERE SIEMPRE :shock: :? :cry:

Por tjmysteri

Claber

138 de clabLevel



 

msie7
Citar            
MensajeEscrito el 14 Abr 2009 11:26 pm
El primer error, cargarprevias se define por un "numFotos" variable que no es declarada. ademas de que tus fors tienes dos veces la variable i. te reocmiendo uses otro nombre para la varaible como por ejemplo, j.

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox

 

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