Home > Adobe Flash > Solution to MovieClipLoader Caching Issue

Solution to MovieClipLoader Caching Issue

The MovieClipLoader class allows you to load External SWF and .JPG images inside your Flash Swf File. But this class comes with a small bug that it remains in the computer memory once it is loaded.
Because of staying inside the memory the onLoadInit listener does not get fired because it is already fired.

Your email:

 


To resolve this problem the easiest and the most effective solution is to provide a TimeStamp along with the Swf Filename or the .JPG Image.

Your email:

 


Example – Using MovieClipLoader without TimeStamp

var my_mcl = new MovieClipLoader();
my_mcl.loadClip(filename,container_mc);

Example – Using MovieClipLoader with TimeStamp

var new_date = new Date();
var my_mcl = new MovieClipLoader();
my_mcl.loadClip(filename+"?"+new_date.getUTCMilliseconds(),container_mc);


Custom Search

Popular Articles:

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • IndianPad
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • RSS
  • Technorati
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Reddit
  • Add to favorites
  • PDF
  • Twitter
Categories: Adobe Flash Tags:
  1. October 15th, 2007 at 11:29 | #1

    One of the classical Flash Tricks.

    Please note: this will work in Ajax too.

  1. No trackbacks yet.