I'm currently trying to implement a crop tool to our Application.
My problem is that I keep getting indexOutOfRange errors from TransformManager.bringToFront either when clicking on the image I want to crop or when clicking outside to unselect it.
The same application also gives me from time to time an "wrong parent" error when trying to remove the dummyBox, event though the instance passes the "_selection.parent == _parent" test just before (TransformManager.updateSelection).
Both Errors seem very very weird as the range error is thrown even thought range is correct and the parent is ok.
Does anyone have any clue on what I'm doing wrong ?
Here's a sample app and my basic instanciation code :
protected function application_creationCompleteHandler(event:FlexEvent):void
transformManager.bounds = new Rectangle(0,0,955,600);
imageCompo.image.source = "image.jpg" ;
protected function image_readyHandler(event:Event):void
// for some reason flex never tells you when the image is actually ready
private function wtf_flex_handler():void
trace ("timer complete");
var crop:FlexCrop=new FlexCrop(imageCompo.image, transformManager);
and the imageCompo code :
public class ImageComponent extends SkinnableComponent
public var image : Image;
//...some basic stuff
Thanks in advance for any input that could help me, I'll give out anything I find if I do find something.