Hi, this is driving me mad.... I need to create dinamically an accordion instance. What I mean is create it by code. I'll have an unknown number of childs (max 20), but the content of each one is a datagrid. My thought is making just one movieclip and link this movieclip with each children but I donĀ“t want 20 instance of the same movieclip, so I'm trying to create dinamically the empty movieclip with a datagrid, as I click in each children.
Any other way to do this? I'm trying with: (something like this but I don't have the code here) ************ INI CODE ********************* _root.createEmptyMovieClip(content,1) content.createClassObject(mx.controls.DataGrid,"datag", 2,{_x:100,_y:100,_width:300, _height:200}) miAcordeon.createChild("View", "opcion1", {label:"Option1"}); miAcordeon.createChild("View", "opcion2", {label:"Option2"}); miAcordeon.opcion1.createChild("content", "content1_mc"); miAcordeon.opcion2.createChild("content", "content2_mc"); ******** END CODE ***************** where miAcordeon is an accordion component in stage; This code produce that datagrid appears over the accordion, but it is not closed/disclosed as I click on children. Help, please, help. Thanks and regards. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders