UI: ImageTransfomer

UI: ImageTransfomer

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 it by clicking on the image as I can’t get WordPress to play nicely.

http://flickey.com/blog/wp-content/uploads/2007/09/imagetransformer.JPG


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.

Share

0 条评论

留下评论