Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Atonis

Members
  • Posts

    3
  • Joined

  • Last visited

Atonis's Achievements

1

Reputation

  1. yeah I thought about using the flextransformmanager, but I can't really do that, It's instanciated somewhere else and I'd rather have only markup definitions in my mxml. I had to remove the image component thougt and have directly on my main app view, since we are running out of time and I still had a bunch of errors. By the way, I had to "ducttape" the onReleaseMove method In TransofmManager from if (_trackingInfo.moved) { dispatchInteractiveEvent(TransformEvent.FINISH_INTERACTIVE_MOVE); } to if (_trackingInfo && _trackingInfo.moved) { dispatchInteractiveEvent(TransformEvent.FINISH_INTERACTIVE_MOVE); } as _trackinInfo is not always instanciated (not sure why). Thanks guys, your tool just saved me a few days of coding to have a working crop tool (and the rest of the transformmanager is awesome)
  2. update : using transformManager.forceSelectionToFront = false; prevents the issues wich in my case is good enough as I only modify one item.
  3. Hello, 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=new TransformManager(); transformManager.bounds = new Rectangle(0,0,955,600); imageCompo.image.source = "image.jpg" ; imageCompo.image.addEventListener(Event.COMPLETE,image_readyHandler); } protected function image_readyHandler(event:Event):void { trace ("complete"); // for some reason flex never tells you when the image is actually ready setTimeout(wtf_flex_handler,1000); } 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 { [SkinPart(required="true")] 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. proto-crop-greensock.zip
×