Stage Layout Manager Class - Performance

Hello,

I’ve been messing around with a stage layout classes off and on for a little while. I created a simple one a while ago that while it worked, was a simple instance based approach, one stageResizeManager class per object.

So, I thought I’d try to make more of a manager, which could take any number of clips and lay them out (position) them on the stage however you want.

Anyway, I’ve made it, but I kinda think the performance is terrible. I’m using an object approach to store all the various properties of each clip and iterating over these properties seems to nosedive performance. I was thinking of flattening the passed in object with parameters into an Array and simply using that, or wrapping each passed in DisplayObject in its own class instance.

What do you think is the best approach performance wise for a utility like this? I’m tending towards using a class wrapper approach, and just using the manager class to manage the communication between outside parties and each “managed displayObject”.

I’ve attached what I have, have a look if you like and let me know what you think. (Flash CS3, various classes)

I’ve made the various changes suggested and uploaded the finished version here:

http://www.blog.noponies.com/archives/109