2 Replies Latest reply on Mar 31, 2008 1:11 PM by

    loadmovie function causing flickering on mouseover

    katneville
      Hi there,

      I'm not great with actionscript, but I'm making a scrolling gallery, where when you mouse-over the image, it gets bigger. I've called it in with

      loadMovie("pic1_thumb.jpg", "thumbnail_loadbox");

      One the over keyframe, I have a separate version of the thumbnail, slightly larger, but now when I publish it, it loads the image twice, once originally and once again when you mouse-over.... EVERYTIME. This causes it to flicker. Any suggestions on how to pre-load the thumbnails so that it doesn't flicker?

      Thanks! I appreciate your help!
        • 1. Re: loadmovie function causing flickering on mouseover
          I dont really know how you called everything but here´s one way to handle
          your problem:

          yourImage.onRollOut = function () {
          unloadMovie(whatever you want);

          };

          Your pictures i cached in the users webbrowser even if you unload the content.
          So you don´t really need to preload you pictures :-)


          I hope this guide you further.

          :-)

          • 2. loadmovie function causing flickering on mouseover
            Here´s a another way to solve the problem:
            It´s more technical and it really dont preload any images (sorry for that) but it scale the picture
            But it maybe guide you further:

            //Create a virtual empty movieclip
            this.createEmptyMovieClip("mc_gallery_box", this.getNextHighestDepth());
            //Flash have to be know that all the cotent has been loaded before any other code is executed
            //therefore I add a Listener
            var myListener:Object = new Object();
            //When all the content is loaded then what..scale the picture +50%
            myListener.onLoadInit = function(mcContent:MovieClip):Void {
            mcContent._xscale = 150;
            mcContent._yscale = 150;
            }
            //Moviclip loader + instance
            var mc1Loader:MovieClipLoader = new MovieClipLoader();


            //Event handler
            this.btn1_mc.onRelease = function(){
            //Loading a content
            mc1Loader.loadClip("pic1_thumb.jpg", mc_gallery_box);
            mc1Loader.addListener(myListener);

            }

            this.btn1_mc.onRollOut = function(){
            mc1Loader.unloadClip(mc_gallery_box);

            }