check out also this link :

http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library

I've used it a few times and it works great !



Helmut Granda wrote:
I created a simple class for an object that would be attached to the Stage
with a simple:

attachMovie("blah", "bla");

it all works great, but I wanted to move the code completely away from the
timeline and move it into
a new class that will initiate the whole process.

So my first thought was attach the Movie within the original class, but of
course now my events wont have effect into the new created object.

So what would be the best approach?

In the perfect world I would have a class that will then use the class that
I created to create new items without having to do any coding in the
timeline

One more thing, I tried registerClass after creating the objects within the
original class, it works but for some odd reason it adds 2 items on the
stage
rather than only 1 as requested.

TIA
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to