?
Solved

What's the BEST way to preload this stuff?

Posted on 2003-02-19
7
Medium Priority
?
133 Views
Last Modified: 2010-04-03
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.
0
Comment
Question by:dragonworx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 6

Expert Comment

by:henryww
ID: 7985585
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
0
 
LVL 5

Accepted Solution

by:
elhy earned 200 total points
ID: 7985991
hi,

1. If your url for the swf and jpg doesn't change, it will load the one in the browser cache. a slight change in the file size and url will make the browser reload the files again.

2. I dun quite understand the point for this question. coz if you are going to import the jpg into the library, why bother to use loadMovie to load them dynamically again? Wouldn't it be faster if u were to retrieve these images from the library since u already have it?

3. To change the setting for "fake" connection speed:

i)  Press Ctrl+Enter to go into the 'Test Movie' stage.
ii) Select "Debug" from the program.
iii)Select 56K.
iv) You can set a customize speed by selecting customize.
v)  After selection of speed, press ctrl+enter again to show streaming and test your movie loading in that selected speed.

0
 
LVL 5

Expert Comment

by:elhy
ID: 7991876
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.
0
 
LVL 6

Expert Comment

by:henryww
ID: 7997998
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);

}
0
 
LVL 6

Expert Comment

by:henryww
ID: 7998016
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...


0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question