Gregory,

I wasn’t sure, that’s why I proposed 2 ways, but I just checked and neither
will let you redefine the class associated with a movieclip. So I guess it’s
back to square one.
So far you have to create an new instance for the class you want to load
using Object.registerclass and attachMovie. I can’t think of any other way
right now.

I know it’s not what you had in mind, but maybe someone else can think of
something or try something out.

Good luck !

Alain


From: GregoryN <[EMAIL PROTECTED]>
Reply-To: Flashcoders mailing list <flashcoders@chattyfig.figleaf.com>
Date: Mon, 17 Apr 2006 21:32:11 +0400
To: Flashcoders mailing list <flashcoders@chattyfig.figleaf.com>
Subject: Re: [Flashcoders] good OOP way to re-assign class to clip

Alain,

I think you've misunderstood me.

I already have a movie clip on the stage, which was placed by
attachMovie(), and before it was an instance in the library,
assotiated with  MyClass1 .

Then, after some things happen (e.g. user moved this clip), I wand to
assign ANOTHER class to the mentioned clip, so this very clip to
become an instance of MyClass2.

That's why I need to RE-define the class for this clip.
  

-- 
Best regards,
 GregoryN          
================================
http://GOusable.com
Flash components development.
Usability services.

> ---------- Alain Rousseau wrote:
>
> You should look into this article in the FlashCoders Wiki
> 
> http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_mo
> vieclip_without_a_symbol_in_the_library
> 
> This is if you want to create dynamically a movie clip and then associate a
> class to it.
> If you allready have a moviclip that you want to use, you should look into
> Object.registerClass(³myClipID², MyClass);

_______________________________________________
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