Sure - that's what I like about doing it that way - each row is a movie clip, so you can size each row however you like - the next row's position is based on the previous row's _y + _height - so they are positioned correctly.
May not be the best solution as far as processor requirements, but it does the job and offers more flexibility in my opinion. Jason Merrill | E-Learning Solutions | icfconsulting.com >>-----Original Message----- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Stan Sainte-Rose >>Sent: Friday, December 16, 2005 11:51 AM >>To: Flashcoders mailing list >>Subject: Re: [Flashcoders] Generate a list with xml >> >>Jason, >> >>I think it's the idea... I will think about it. >>A stupid question, do you think using this concept, I ll be able to have row >>with different heights ? >> >>Thanks.. >>Stan >> >> >>2005/12/16, Merrill, Jason <[EMAIL PROTECTED]>: >>> >>> >>Ok, but a stupid question do u know how to distribute each MovieClip >>> object >>> >>to get a list appearance ? >>> >>> Been frustrated with DataGrid in a past project, been leary of it ever >>> since - I'm probably a wuss, but instead I made my own data grid using >>> Movie Clips and a scroll pane and it's been working great. This is a >>> working draft - not finished - and you'll need to click through some >>> javascript dialog boxes first, but see the grid in the "planner" tab: >>> >>> http://cmt.icfconsulting.com/CDRH/DiscoveryPortal%20Source%20Code/Flash/ >>> version4/DiscoveryPortal.html >>> >>> Here's part of the script that creates and positions the rows - based >>> on XML data (XPath): >>> >>> function createPlannerGrid(target_mc:MovieClip, title:String, x:Number, >>> y:Number, width:Number, height:Number):Array { >>> var Rows:Array = new Array(); >>> target_mc.attachMovie("rowTitles_mc", "rowTitles_mc", 1); >>> target_mc.rowTitles_mc._x = >>> parseInt(XPath.selectNodes(session.data.xmlFiles["config_xml"], >>> "config/planner/[EMAIL PROTECTED]")); >>> target_mc.rowTitles_mc._y = >>> parseInt(XPath.selectNodes(session.data.xmlFiles["config_xml"], >>> "config/planner/[EMAIL PROTECTED]")); >>> target_mc.createClassObject(mx.containers.ScrollPane, >>> "items_sp", 10); >>> target_mc.items_sp.contentPath = "blank_mc"; >>> var numRows:Number = >>> XPath.selectNodes(session.data.xmlFiles["tasks_xml"], >>> "tasks/task").length; >>> for (var i:Number = 0; i<numRows; i++) { >>> var thisRow:MovieClip = >>> target_mc.items_sp.content.attachMovie("plannerRow_mc", "row"+i+"_mc", >>> i+11); >>> Rows.push(thisRow); >>> if (i>0) { >>> thisRow._y = Rows[i-1]._y+20; //position the >>> rows >>> } >>> if (i%2 == 0) { >>> thisRow.gotoAndStop(2); //alternate the row >>> colors >>> } >>> } >>> target_mc.items_sp.move(x, y); >>> target_mc.items_sp.setSize(width, height); >>> return Rows; >>> } >>> >>> Jason Merrill | E-Learning Solutions | icfconsulting.com >>> >>> >>> >>> >>> >>> >>> >>> NOTICE: >>> This message is for the designated recipient only and may contain >>> privileged or confidential information. If you have received it in error, >>> please notify the sender immediately and delete the original. Any other use >>> of this e-mail by you is prohibited. >>> _______________________________________________ >>> Flashcoders mailing list >>> Flashcoders@chattyfig.figleaf.com >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>_______________________________________________ >>Flashcoders mailing list >>Flashcoders@chattyfig.figleaf.com >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders