kingyiren / flex-object-handles

Automatically exported from code.google.com/p/flex-object-handles
0 stars 0 forks source link

how to delete objecthandal selected object #35

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
hi all,

how to delete objecthandal selected object.

i try to this code but select object not properly deleted & show every time
his id.

var theSelected:ObjectHandles = SelectionManager.instance.currentlySelected
as ObjectHandles; 
                var parentContainer:DisplayObjectContainer;

                if(selectedObject != null)
                {
                    var txt1:TextArea = selectedObject.getChildAt(0) as TextArea;
                    if(txt1 != null)
                    {
                        myRemote.deleteFrontData(sessionid,txt1.id);

                    }
                    if( theSelected != null && theSelected.parent != null ) {

                        SelectionManager.instance.selectNone();        // Cosmetical
stuff, just deselect.
                        parentContainer = theSelected.parent;            // Get the
parent container
                        parentContainer.removeChild( theSelected );   // Remove the
selected OH
                    } 
                    }

Original issue reported on code.google.com by abidr...@gmail.com on 5 Feb 2010 at 6:25