Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / March 2008



Tip: Looking for answers? Try searching our database.

loadmovie function causing flickering on mouseover

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
katneville - 31 Mar 2008 17:57 GMT
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!
highlander_1 - 31 Mar 2008 18:31 GMT
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.

:-)

:smile;
highlander_1 - 31 Mar 2008 21:11 GMT
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 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..
myListener.onLoadInit = function(mcContent:MovieClip):Void {
    trace(mcContent._name);
}
//Movieclip loader + instance
var mc1Loader:MovieClipLoader = new MovieClipLoader();

//EVENT HANDLER
this.yourBtn_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);

}

:smile;
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.