Link to home
Start Free TrialLog in
Avatar of dragonworx
dragonworx

asked on

What's the BEST way to preload this stuff?

Hi All,

I have a strong background in Director, and have only recently moved to Flash. I'm building a site, and have to resolve some resource managment issues. I have 3 questions which i would areally appreciate some help on. Thanks in advance for your time.

1) When using MovieClip.loadMovie() on a jpg or swf file, does the Flash player use the browsers cache to store the downloaded files?. I'm hoping that if you use loadMovie() on a jpg or swf once, the second time you try to do it from another movie, the Flash player is smart enough to use the cached copy. Director's Shockwave player does this, and it comes in handy. Does anyone know if the Flash player does the same thing with loadMovie() items?

2) When you use loadMovie() to load a jpg into your movie, how can you make that object a library symbol? Specifying a target to load isn't enough. I'm hoping to load some jpg's in first, then load the swf sections in and out of the main movie, but have them able to reference the initially imported jpgs from the library. This is so i could use attachMovie() later.

3) Any good references for using the bandwidth profiler to test your movies on a "faked" slower connection? I can't seem to work it out from using the manuals that come with Flash. I have a fast connection, and i need to see how the movies perform under a 56k speed. I know it has something to do with the test movie and bandwidth profiler, but i can't find any good tutorials or references on it.

Thanks for your time, I appreciate your help.

dragonworx.
Avatar of henryww
henryww

hi dragonworx,

1) when the movie is loaded the 1st time, then it is already in the movie, why load it the 2nd time? can with duplicate movieclips (even for jpg). but i am sure the movie is being loaded from cache instead, otherwise check you browser settings


2) similar as in 1 ... load a jpg into a target movieclip and use duplicateMovieClip to make more


3) well, ctrl-B to show the profiler & from the menu click debug to change the connection speed - that press ctrl-enter again to see it streaming & speed ... etc ...
that's how i do it anyway ...

cheers
ASKER CERTIFIED SOLUTION
Avatar of elhy
elhy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi henryww,

I've just did a testing, u can duplicate a movieclip but if the movieclip contains dynamically loaded jpg, the jpg won't show up.
that's true and same for the other question that we were looking at ...

u are right :)

i am sorry ... now i understand why dragonworx want to add it to the library ... he he he

well, can't use standard flash function to do that, but write a simple function can do similar action.

like

// pass an mc to the function
function loadJPG(target,jpgURL,lvl) {
   target.loadMovie(jpgURL,lvl);

}
that's true and same for the other question that we were looking at ...

u are right :)

i am sorry ... now i understand why dragonworx want to add it to the library ... he he he

well, can't use standard flash function to do that, but write a simple function can do similar action.

like

// pass an mc to the function
function loadJPG(target,jpgURL,lvl) {
   target.loadMovie(jpgURL,lvl);
   target.jpgURL = jpgURL;
   target.jpgLvl = jpgLvl;
}

function dupJPG (target, iName, lvl){
   var theParent = target._parent;
   var jpgURL = target.jpgURL;
   var jpgLvl = target.jpgLvl
   theParent.duplicateMovieClip(target, iName,lvl);
   theParent.iName.loadMovie(jpgURL,jpgLvl);
}

something like that, haven't tested in flash, but the logic should be right, otherwise we can create an object to due with it...