UI: ImageTransfomer September 22, 2007
Based on some AS1.0 code from Peter Hall I think, it's been tweaked over many years.
I've added dynamic registration point based off the code here (with significant tweaks). You can play with an early version here.
The tool is contextual, and follows whatever is selected.
The cool thing about the imageTransformer (will likely change names as cropping and masking is implemented) is it's a container for UI interaction, not a direct editor so it can be added or removed easily from other DisplayObjects like:
-
import com.troyworks.controls.*;
-
import flash.events.MouseEvent;
-
import flash.events.KeyboardEvent;
-
-
var aimgT:ImageTransformer = new ImageTransformer();
-
aimgT.setClipToManipulate(a_mc);
-
aimgT.setUIControls(scale_btn, rotate_btn, move_btn, c);
-
aimgT.initStateMachine();
This tool selection is based on Cogs and the Sketch version will be coming shortly, thus easily skinnable. I'm going to implement a Focus and SelectionManager prior to releasing as the demo shows them all vying for the same control in parrallel leads to undesired behavior.

Add a Comment: