Skip to content

So how it should work?

September 6, 2006

As mentioned before, I’ve got much respect to MovieClips. It is a greate concept to interact with animation. However, they got some issues that can make you pull you hairs, trying to achive something that supposed to be a pice of cake.

So I had to think of a way to make all the handling of movieclips, as easy and, off course, as fun as possible.
After rewriting the LoadingManager V2 class I figured What are the things needed to be researched.
The first thing was, off course, the event handling. The build in MovieClips has a very simple event handling, witch is good and simple enough for programmers still programming in frames, but can make an OOP programmer loose his mind. Well, almost… I wanted to create a unified event system for all movieclips, witch enables you to create more then one listener per event, and the listeners would’nt loose their scope.
The second thing was, I wanted is to create “behaviours” to movieclips, but still not to loose the MovieClip identity. The two solutions that macromedia gave us where – on the one hand, extending the MovieClip class, witch made some problems with actually creating a movie clip that is the class you’ve created. The second, was to create a class that do something on the movieclip, like Color or Transform. But then, you still loose the identity of that MovieClip.
By “loosing the identity” I ment that in the program I use Color as “Color” and not as “a feature of a movieclip”, moreover, Color cannot be aware of other decorators like this one and interact with them.

To achive these goals, I came up with the idea of creating an event management system for the movieclips, eventually, based on Macromedia basic mx.events.EventDispatcher, witch I pretty like. And then – to solve the featurs VS identity issues, I used the concept of plugin based programs, like Miranda-IM and FlashDevelop and applyed it to be programmaticaly on a movie clip.

To get this managed well enough, and not to clutter too much the main “Plugin manager class”, I’ve created ServiceProvider. usind IndexedHash and ClassHash witch will be inroduced in the future.

Advertisements
Leave a Comment

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: