http://muzakdeezign.com/flashcoders/?q=dynamically%20assign%20class http://muzakdeezign.com/flashcoders/?q=dynamically%20associate%20movieclip%20class
----- Original Message ----- From: "David Cohn" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, February 05, 2007 7:15 PM Subject: [Flashcoders] Re: extends MovieClip Hey all, Thanks for all the insights! > Sounds like you are trying to extend an instance of a MovieClip... Yes, this mistake did creep into my thinking a bit-- thanks for getting me back on track! I'm trying to create code such that a graphic designer can hand me a movieClip and I can slap a class on it to define behavior integral to the movieClip ("extends MovieClip"). An instance of the movieClip would then instantiate the class, with the possibility of passing arguments to the constructor. I'd also like to use multiple inheritence, but I think I can work around that by using sub-classes: private var type1handler; private var type2handler; function blah( type1:String, type2:String ) { switch(type1) { case a: type1handler = new <class1_a> case b: type1handler = new <class1_b> } switch(type2) { case a: type2handler = new <class2_a> case b: type2handler = new <class2_b> } } _______________________________________________ [email protected] 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

