Comunidad de diseño web y desarrollo en internet online

problema con MovieClip Loader

Citar            
MensajeEscrito el 14 Feb 2007 07:47 pm
Estoy utilizando la Clase MovieClipLoader para cargar un .jpg, pero resulta que no me lo carga. Lo que me extraña es que estoy reutilizando el código de otro .swf y ahí si que funciona. Aquí os dejo el AS haber si hay algun error de esos garrafales:

Código :

function mostrar_thumbs(exit:Boolean):Void {
   thumbs_mc.thumbs_txt.htmlText = "";
   if (exit) {
      if (this.output == 'ok') {
         for (i=0; i<imgs; i++) {
            var marc:MovieClip = thumbs_mc.createEmptyMovieClip("clip"+i, i*10);
            var thumb:MovieClip = marc.createEmptyMovieClip("img"+i, getNextHighestDepth());
            thumb.loadMovie("obres/"+this['thumb_url'+i]);
            thumb._x = marge+ample;
            thumb._y = marge;
            ample = ample+Number(this['width'+i])+espai;
            marc.z = i;
            marc.onPress = function() {
               if (mogut == false) {
                  mogut = true;
                  var tweenThumbsY:Tween = new Tween(thumbs_mc, "_y", Strong.easeInOut, thumbs_mc._y, marge*2, 1.25, true);
                  tweenThumbsY.onMotionFinished = function() {
                     attachMovie("amp","amp_mc", (thumbs_mc.getDepth()-1));
                     amp_mc.filters = array1;
                     amp_mc._x = (Stage.width-amp_mc._width)/2;
                     amp_mc._y = (Stage.height-amp_mc._height)/2;
                     var img:MovieClip = amp_mc.createEmptyMovieClip("img_amp", getNextHighestDepth());
                     var load_obres:MovieClipLoader = new MovieClipLoader();
                     var listen_obres:Object = new Object();
                     listen_obres.onLoadInit = function(target){
                        img._x = (_parent._width-img._width)/2;
                        test.htmlText = "acabat";
                     }
                     load_obres.addListener(listen_obres);
                     listen_obres.loadClip("obres/imgs/07.jpg", amp_mc.img_amp);
                  };               
               }            
            };
         }
      } else {
         test.htmlText = "Error: "+this.msg;
      }
   } else {
      test.htmlText = "Error loading data";
   }
}


He probado con loadMovie y un EmptyMovieClip y si que funciona.

Por saulo

43 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 15 Feb 2007 08:05 pm
ve si las versiones de flash no son diferentes...
a y yo ando buscando como subir una imagen dentro de un swf,
sabes como hacerlo. saludos

Por stropfx

1 de clabLevel



Genero:Masculino  

2006

firefox
Citar            
MensajeEscrito el 16 Feb 2007 04:29 pm
¿A que te refieres, a insertar una imagen?

Por saulo

43 de clabLevel



Genero:Masculino  

msie

 

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