2 Replies Latest reply on May 18, 2006 2:42 PM by Newsgroup_User

    Preloader for Pictures

    Level 7
      Hi,

      I load pictures on the fly that I use for a thumbnailer system.
      How can I set up a preloader for these pictures ?
      In fact, I would like to use one and only one preloader system that can
      display a kind of Countdown for all the pictures.
      I mean, if I have 5 pictures to load, I don't want to calculate the kb
      loaded for each picture but for all the pictures..
      (it seems that my language is very limited, but I hope you will understand
      what I want to say)...

      Stan


        • 1. Preloader for Pictures
          Rooksta
          put all the pictures in one movie clip, and than add your preloader to that movie clip.
          • 2. Re: Preloader for Pictures
            Level 7
            Ok, but I don't know how to do this with my code..
            The code may be not conventinal (newbie I am).
            If you could tell me how to add a preloader for the miniature_mc movieclip ?
            And by the way, you will notice that I load 2 times each pictures (one for
            the thumbnail and the other one for the Zoom part).
            How to avoid to reload each jpg ?
            Someone mentionned to use the bitmap class but don't know how to use it..

            I thank you in advance for your precious help

            Stan


            here's my code

            var nomMc:String;
            for (var i:Number=0;i<lesImages.length;++i){
            nomMc="mini"+i+"_mc";
            miniature_mc.ligne_mc.attachMovie("vignette_clip",nomMc,i);
            miniature_mc.ligne_mc[nomMc]._x=34.5+(69*i);
            miniature_mc.ligne_mc[nomMc]._y=35;
            miniature_mc.ligne_mc[nomMc].onRelease=function(){
            var b:MovieClip = this.getZoom();
            ZoomPhoto(b);
            }
            placePhoto_mc.attachMovie("zoomMC","zoom"+i+"_mc",i);
            placePhoto_mc[nomMc]._visible=false;
            miniature_mc.ligne_mc[nomMc].setZoom(placePhoto_mc["zoom"+i+"_mc"]);
            miniature_mc.ligne_mc[nomMc].setNumero(i);
            var my_mcl:MovieClipLoader = new MovieClipLoader();
            my_mcl.addListener(mcl_obj)
            my_mcl.loadClip(lesImages ,miniature_mc.ligne_mc[nomMc].vignette_mc.emplacement_mc);
            my_mcl.loadClip(lesImages
            ,placePhoto_mc["zoom"+i+"_mc"].fgPhoto_mc);
            }
            }


            mcl_obj.onLoadInit=function(target_mc:MovieClip):Void{
            if (target_mc._name.substr(0,7)=="fgPhoto"){
            if (target_mc._height>target_mc._width){
            target_mc._width=target_mc._width*(46/target_mc._height);
            target_mc._x+= (63-target_mc._width)/2;
            target_mc._height=46;
            if (!photoInitiale){
            ZoomPhoto(placePhoto_mc["zoom0_mc"]);
            photoInitiale=true;
            }
            }else{
            target_mc._height=target_mc._height*(63/target_mc._width);
            target_mc._width=63;
            if (!photoInitiale){
            ZoomPhoto(placePhoto_mc["zoom0_mc"]);
            photoInitiale=true;
            }
            }
            target_mc._x+=-32;
            target_mc._y+=-26;
            }else{
            if (target_mc._height>target_mc._width){
            target_mc._width=target_mc._width*(70/target_mc._height);
            target_mc._x+= (93-target_mc._width)/2;
            target_mc._height=70;
            }else{
            target_mc._height=target_mc._height*(93/target_mc._width);
            target_mc._width=93;
            }
            }
            }




            "Rooksta" a �crit dans le message de news:
            e4ia85$6ki$1@forums.macromedia.com...
            > put all the pictures in one movie clip, and have than add a preloader to
            > that movie clip.