What I am trying to do (with out much success) is to disable the one list container(srcgrid) if a person drags "All Reports" into the destination list container(destgrid), I have tried using selectedIndices with both the text and the value of zero as this is the index of "all reports" but it doesn't work, can anyone help? ...here is my mxml code:
standardReports.mxml <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.macromedia.com/2003/mxml" width="100%" > <mx:Script> function changeOther( event ) { if ( event.target == summaryCHB ) detailCHB.enabled = ! detailCHB.enabled; if ( event.target == detailCHB ) summaryCHB.enabled = ! summaryCHB.enabled; if ( event.target == summaryCHB2 ) detailCHB2.enabled = ! detailCHB2.enabled; if ( event.target == detailCHB2 ) summaryCHB2.enabled = ! summaryCHB2.enabled; if ( event.target == summaryCHB3 ) detailCHB3.enabled = ! detailCHB3.enabled; if ( event.target == detailCHB3 ) summaryCHB3.enabled = ! summaryCHB3.enabled; } </mx:Script> <mx:Script source="DragEventHandlers.as"/> <mx:Script> <![CDATA[ var thrustData:Array = ["All Reports", "ASMT - Affordable Structures & Mfg. Tech.", "ALE - Advanced Lean & Efficient", "ASC - Advanced Support Concepts", "APS - Advanced Platform Systems", "NCO - Netcentric Operations" ]; ]]> </mx:Script> <!-- Create a LinkBar container to navigate the ViewStack container. --> <mx:LinkBar dataProvider="myViewStack" width="100%" borderStyle="inset" borderColor="#123154" textRollOverColor="#00CC00" disabledColor="#A1C472" backgroundImage="@Embed('_images/viewstk_bkgrnd.png')" backgroundSize="100%" /> <!-- Define the ViewStack and the three child containers. --> <mx:ViewStack id="myViewStack" borderStyle="inset" borderColor="#123154" width="100%" height="100%" backgroundImage="@Embed('_images/viewstk_bkgrnd.png')" backgroundSize="100%"> <mx:Canvas id="thrustRPTS" label="Thrust Reports" width="708" height="238"> <mx:Label text="Thrust Reports" x="0" y="2" color="#A1C472" /> <mx:HBox x="320" y="183" > <mx:FormItem > <mx:CheckBox label="Summary" color="#123154" labelPlacement="top" id="summaryCHB" click="changeOther( event );"/> </mx:FormItem> <mx:FormItem> <mx:CheckBox label="Detail" color="#123154" labelPlacement="top" id="detailCHB" click="changeOther( event );"/> </mx:FormItem> </mx:HBox> <mx:HBox x="5" y="20" > <mx:List id="srcgrid" width="265" height="150" multipleSelection="true" dataProvider="{thrustData}" dragEnabled="true" dragEnter="doDragEnter (event)" dragExit="doDragExit(event)" dragDrop="doDragDrop(event)" dragOver="doDragOver(event)" dragComplete="doDragComplete(event)" toolTip="Drag any of these items to the box on the right." x="-6" y="21"/> <mx:List id="destgrid" width="265" height="150" multipleSelection="true" dragEnabled="true" dragEnter="doDragEnter(event)" dragExit="doDragExit(event)" dragDrop="doDragDrop(event)" dragOver="doDragOver(event)" dragComplete="doDragComplete(event)" /> </mx:HBox> <mx:Text x="5" y="175" text="Drag & Drop your selecions into the box on the right" width="265" height="35" /> </mx:Canvas> <mx:Canvas id="businessUnitRPTS" label="Business Unit Reports" width="100%" height="100%"> <mx:Label text="Business Unit Reports" color="#A1C472" /> <mx:Link label="Aerospace Support" x="4" y="24" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Air Force Systems" x="4" y="44" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Army Systems" x="4" y="64" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Homeland Security" x="4" y="84" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="IDeAS" x="4" y="104" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Missle Defense Systems" x="4" y="124" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="NASA Systems" x="4" y="144" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Naval Systems" x="4" y="164" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Space & Intelligence Systems" x="4" y="184" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:HBox x="4" y="214" > <mx:FormItem > <mx:CheckBox label="Summary" color="#123154" labelPlacement="top" id="summaryCHB2" click="changeOther( event );"/> </mx:FormItem> <mx:FormItem> <mx:CheckBox label="Detail" color="#123154" labelPlacement="top" id="detailCHB2" click="changeOther( event );"/> </mx:FormItem> </mx:HBox> </mx:Canvas> <mx:Canvas id="marketSBCRPTS" label="Sub-Council Reports"> <mx:Label text="Market Sub-Countil Reports" color="#A1C472" /> <mx:Link label="Homeland Security" x="4" y="34" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Integrated Battlespace" x="4" y="54" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Launch and Exploration Systems" x="4" y="74" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Missile Defense" x="4" y="94" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Mobility" x="4" y="114" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Precision Engagement" x="4" y="134" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:Link label="Sustainment" x="4" y="154" alpha="0" textRollOverColor="#00CC00" color="#123154" /> <mx:HBox x="4" y="184" > <mx:FormItem > <mx:CheckBox label="Summary" color="#123154" labelPlacement="top" id="summaryCHB3" click="changeOther( event );"/> </mx:FormItem> <mx:FormItem> <mx:CheckBox label="Detail" color="#123154" labelPlacement="top" id="detailCHB3" click="changeOther( event );"/> </mx:FormItem> </mx:HBox> </mx:Canvas> </mx:ViewStack> </mx:VBox> and the drag and drop as stuff, actually just the doDragComplete section; function doDragComplete(event) { doDragExit(event); var src = event.target; if (event.action == DragManager.MOVE) { var items = src.selectedIndices; items.sort(sortByNumber) items.reverse() var s=""; for(var i = 0; i < items.length; i++) { s=s+items[i]+" : "; } for(var i = 0; i < items.length; i++) { src.removeItemAt(items[i]) } } if (event.target.selectedIndices == "All Reports"){ srcgrid.enabled = !srcgrid.enabled; } } Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/