Jump to content
Search Community

mortenjo

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by mortenjo

  1. 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
×
×
  • Create New...