Content Manager Class

These are some ideas that I have been working on. The goal was to make a simple system to display images or movie clip symbols on the stage. These use Tween for animation duties so be sure to include the Tweener class in the folder with any project that might use the Content_Manger class.

The basic idea is to animate any currently displayed clip off the stage and remove it from the display list. Then add a new clip to the display list and moveĀ  this clip in to view.

The first version, Content_Manager, extends the MovieClip class and so itself must be added to the display list. Content_Manager_1 example files: Content_Manager

The second version, Content_Manager2 takes three parameters when it is instantiated, these are:

  1. open_tween:Object
  2. close_tween:Object
  3. start_values:Object

These parameters determine the animation object that will be passed to Tweener for clips that are added to a page, open_tween. The animation object passed to Tweener for clips that are removed, close_tween. And an object containing the starting properties for clips that have been added to the stage, start_values.

Start_values set the intial starting properties for a clip, open_tween sets the animation applied to a clip as it moves on to the stage. Close_Tween sets the animation that moves a clip off the stage. Content_Manager_2 Example files: Content_Manager2

This last version of the content manger, Content_Manager3, adds a new parameter for the host clip. THe host clip is when an instance of Content_Manager3 is created. The host clip determines the MovieClip that Content_Manager3 will be adding, removing and animating clips within. Otherwise it is the same as Content_Manager2.

The example files show several ways in which this class can be used.

Add_Page3.fla, shows serveral different ways that clips can be animated by passing different objects to the Content_Manager3.

Add_Page4, shows how the content manager can be nested. Here the main movie uses content manager to add clips that also contain other instances of the Content_Manager3. Here are the Content_Manager3 example files: Content_Manager3

3 thoughts on “Content Manager Class”

  1. Wierd I’m working on the same kinda thing. It’s called EasyLoader (after the famous 80’s song, Easy Lover by the dude for EWF and Phil Collins).

  2. I had made similar system with FuseKit. I was just rebuilding it with Tweener so it would be AS3 compatible. I guess It could also be done with the flash.transitions.Tween class also. But Tweener is much easier to use.

Leave a Reply

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