Hi guys, I am curious about if am able to add the DisplayObject into a container without using addChild() method, this class is very simple...
1. package 2. { 3. import flash.display.Sprite; 4. import flash.events.Event; 5. 6. public class MyClass extends Sprite 7. { 8. 9. public function MyClass () 10. { 11. //addEventListener( Event.ADDED_TO_STAGE , addedHandler ); 12. parent.addChild(this); 13. } 14. /* 15. private function addedHandler( e:Event ):void 16. { 17. removeEventListener( Event.ADDED_TO_STAGE , addedHandler ); 18. 19. parent.addChild(this); // how could I retrieve the instance name of this"? 20. } 21. */ 22. } 23. } I'd like to do something like.... var do:MyClass = new MyClass(); //addChild(do) // added it into displayobject without using this method here Is that possible? any suggestions are welcome :) Thank you _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders