Loading JPG from different frame

Hi guys, i got a quick question regarding moviecliploader.

i just knew that when you loadMovie some external JPG. it isn’t cached in memory. so when you call the JPG again, you will reload it.

then i got answer from here saying that by using [COLOR=#0066cc]MovieClipLoader[/COLOR], you don’t have to waste bandwidth and call the JPG from memory.

here’s quote from the website: “So I can load it everywhere I need it without using any bandwidth. In this way I can attach the loaded resources everywhere in the movie.”

=========================================

now the study case for me. i need help with this please.

  • i want to load a JPG in frame 5.
  • then i want to preload the jpg in frame 1.

the reason behind it is simply i want to load the jpg first, then view jpg later without dl it first.

the code i use:


frame1**
item is empty movie clip
load_text is empty textfield
total_text is empty textfield*


item._visible = false;
item_loader = new MovieClipLoader();
item_loader.addListener(this);
item_loader.loadClip("xml/home/home.jpg", item);

this.onEnterFrame = function() {
   if (item.getBytesLoaded()/item.getBytesTotal()*100 == 100) {
        gotoAndStop("home");
        delete this.onEnterFrame;
    }
    
    load_text.text = item.getBytesLoaded();
    total_text.text = item.getBytesTotal();
};

now how can i call home.jpg in frame 5 without reloading it ?

thx for all your help :smiley: appreciate it…