Share Posted December 21, 2011 Hi, The removeSelectionBoxElement function is not working correctly. _selectionElements.indexOf(element) will not locate the correct DisplayObject since the _selectionElements array contains objects where the DisplayObject to delete is just one of the properties. This was maybe not the best explanation, but below you can see the change I made to the function to make it work. public function removeSelectionBoxElement(element:DisplayObject):void { for (var i:uint = 0; i < _selectionElements.length; i++){ if (_selectionElements[i].element === element){ _selectionElements.splice(i, 1); if (element.parent == _selection) { _selection.removeChild(element); } } } /* var i:int = _selectionElements.indexOf(element); if (i >= 0) { _selectionElements.splice(i, 1); if (element.parent == _selection) { _selection.removeChild(element); } } */ } Morten Johnsen NVD AS Link to comment Share on other sites More sharing options...
Share Posted December 22, 2011 You are absolutely right. Great catch. Sorry about that - it is fixed in the latest version. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now