Make Flash movies load quicker

If you have a problem with slow-loading Flash movies, maybe you can look at changing your way of working!

Flash lets you create animations, which are themselves often made up of several elements. Let’s say you have a scene of a car driving across the screen. There could be several elements going on here; clouds scudding across the skyline, wheels spinning on the car for example. All of this adds to the size of the file and slows the download. (This is an example OK!)

Splitting the Flash movie into parts can speed up load times, so you might have the background as the main movie and the car as another movie. Put them together by loading the car into the background with some Actionscript like this:

empty_mc._x = 500;
empty_mc._y = 0;
loadMovie(“car.swf”, empty_mc);

The first line creates an empty movie clip, which we then call “empty_mc” and set it’s level (kind of like layer…) at 100.

The next two lines give our new empty clip a position from the top-left corner.

Finally, we tell Flash to load our car movie into the empty clip.

Using this approach, we can build elements that we can reuse in multiple movies too, loading them on demand, such as when a user clicks a button.

other page

What do you think?

It's good to talk!

Your email address will not be published. Required fields are marked *