2 Replies Latest reply on Jul 7, 2006 6:21 AM by rquantin

    Problem with image loding

    JeevM Level 1
      Hello,

      I have craeted an application that loads images as thumbnails. And when i click on each of this i get an enlarged version(as per my specification) of the image.

      My problem is when i click on the thumbnails(movie clips) at first(first time a page is loaded) , the image resizes to its full size but with the next click it comes as per my specification.

      Can anybody solve my problem.

      Code is attached here with.

      Regards,
      jeevs

        • 1. Re: Problem with image loding
          RazvanPat
          You mean that the image shows up to it's normal size (not 3x3) and when you click it it goes to 50x50?
          • 2. Re: Problem with image loding
            rquantin
            When you try to change the size of the picture, the picture is not loaded yet, that's why it's not working. You should use loadClip than loadMovie.

            See below an example:

            // define what happens when the jpg is completely loaded
            function onLoadInit(_mc:MovieClip) {
            _mc._width = 100;
            _mc._height = 100;
            }
            // make info_pic (text field) show cumulative loading progress
            function onLoadProgress(_mc:MovieClip, loaded:Number, total:Number) {
            //info_pic = Math.floor(loaded / total * 100) + "%";
            }

            createEmptyMovieClip("mc_image", getNextHighestDepth());
            var loader:MovieClipLoader = new MovieClipLoader();
            loader.addListener(this);
            loader.loadClip("image.jpg", "mc_image");

            Romu