Skip to content

Loading Manager

August 22, 2006

It all started pretty innocent. I guess it was three things together that drove me to think about the concept of the MovieClipCommander.

It all started with a project I started in my home for flash, flashoo, the best israeli flash community. I tryed to assamble a shared code repository, an open source repository where everyone can share a class, or a prototype he made and think it would come usefull. I called it “Flashoo in Open Source“… Why am I saying that, because one of the projects that started the whole thing.

It was my friend who calls himself Le-Fay that published one of the first classes: LoadingManager. A basic idea of loading a bounch of classes together and then dispatching an event for all of them. Just for the sake of practicing and setting an example for open source colaburation I thought I’ll add something to the class.
Well, beside the API the was slightly changed (well, not changed, but few things where added. Its not a good idea to change a class API in a next version) I was thinking of making it… well more flexible.

What if the loading manager will just load “something” without it knowing what it loads, and I’ll apply several classes for each kind of information it loads. For that time it was only CSS and XML. I don’t belive in design patterns, but I was pretty sure I wan’t inventing any wheels and there is a pattern for that. The catch was the fact that all the extra loaders where loaded in the constructor and the program knew what loader to call by the extention of the file name. Each loader class had is extention definition. That way I could make millions of loaders and initialize them all in the constructor and make it 100% transparent to the user.

Actually what I did was, I made an “extention manager” class that was responsible for making a runtime list of the loader classes. That way, adding another loader was a manner of one simple line.

The original classes can be downloaded from here:
loadingManagerV2.zip
Some changes where made for them over time, and they still have some bugs. But the final version is included in the framework itself. This is just for examination.

I’m still trying to figure out what are the steps needed to publish the framework in a sense of license and documentation, but for now I’ll publish bits here and there.

Itzik

Advertisements
2 Comments
  1. hi there,
    seems pretty cool. Im into doing something like this…so it will be a nice hands on example.
    Let you know how it goes!
    regards,
    goliatone

  2. Idetrorce permalink

    very interesting, but I don’t agree with you
    Idetrorce

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: