Thanks IV I do not want to create the boiler movie clips as these are already on the stage.
Basically I want to be able to control a nested movie clip within each boiler, that is called "needle_mc" And I want the boiler object to store unique properties for each of the boilers. Your code looks very complex for my requirements - can I not simply dynamically create the boiler movie clip path reference and pass it to the boiler instance similar to how I passed the path to the Game class? Thanks Paul -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Iv Sent: 03 December 2006 14:30 To: Flashcoders mailing list Subject: Re: [Flashcoders] Create movieclip path within a class Hello Paul, PS> var vBoiler_Obj:Boiler = new Boiler(vBoilerRef); - this line incorrect. use create method public static function create (this_mc:MovieClip, name:String, depth:Number, init_obj:Object):Boiler { var new_mc:MovieClip = this_mc.createEmptyMovieClip(name, depth); var current_constructor:Function = Boiler; new_mc.__proto__ = current_constructor.prototype; var out_mc:Boiler = Boiler(new_mc); for (var i:String in init_obj) { out_mc[i] = init_obj[i]; } current_constructor.call(out_mc); return out_mc; } and call: var depth:Number = this.getNextHighestDepth(); var vBoiler_Obj:Boiler = Boiler.create(this, vBoilerRef, depth) PS: Template for FDT: public static function create (this_mc:MovieClip, name:String, depth:Number, init_obj:Object):${enclosing_type} { var new_mc:MovieClip = this_mc.createEmptyMovieClip(name, depth); var current_constructor:Function = ${enclosing_type}; new_mc.__proto__ = current_constructor.prototype; var out_mc:${enclosing_type} = ${enclosing_type}(new_mc); for (var i:String in init_obj) { out_mc[i] = init_obj[i]; } current_constructor.call(out_mc); return out_mc; } -- Ivan Dembicki ______________________________________________________________________ [EMAIL PROTECTED] | http://www.artlebedev.ru | http://www.sharedfonts.com _______________________________________________ [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 _______________________________________________ [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

