General Question

serenityNOW's avatar

How Do I Build A Preloader In Flash CS3

Asked by serenityNOW (3641points) March 5th, 2008

All the tutorials I’ve found are quite confusing. Something very basic would be ever so helpful. Thanks!

Observing members: 0 Composing members: 0

1 Answer

paulc's avatar

When you say CS3 I’m assuming you’re talking about using ActionScript 3. Its never going to be as “easy” as AS2 in terms of how the mechanics work. The trade-off is that its so much better to program complex apps in.

Without writing a full-blown tutorial, here’s the basics: Your loader movie will need to to make a new Loader object and request the movie you want to load in. The Loader class is just a proxy class for display objects you can load externally (SWF, JPG, PNG).

The code will look something like this: (sorry there’s no block code formatting on here)

package {
import flash.display.Loader;
import flash.display.Sprite;

class Example extends Sprite {
public function Example() {
var loader:Loader = new Loader();
loader.load(new URLRequest(‘path/to/target.swf’));

That is the simplest way to do it. The class we defined here is your application class. However, you’ll probably want to listen for progress events to maybe show a load bar or something. But that’s going beyond ”very basic”.

AS3 Reference Documents

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther