Introduction

Have you ever wanted to showcase your products with real interaction or simply wanted to create an application that the user could drag, drop, resize and rotate an object?

The transformer class is the perfect solution for scaling, rotating and moving objects on runtime. Using intuitive iterations, this class allows the programmer to have more flexibility and write less code to perform simple transformation tasks.

The first tool of this kind on ActiveDen capable of resizing, moving and rotating an object, it can transform textFields, MovieClips, Vector and Bitmap Graphics (Inside the MovieClip), sliders, buttons, colorPickers, labels, comboBoxes, textInputs and much more.

Using the transformer class, you can easily select, deselect and iterate with objects. You can also listen for a list of events to get the most of this incredible tool.

Sample

To create a new Object Transformer, you just need to type one line of code:

var myTransformer:Transformer = new Transformer(myObject);

Then you can manipulate your transformation as you like, using:

myTransformer.showBorder = true

Simple, isn’t it?

Extras

You will also receive the EasyCursorLite and Utils classes:

With the EasyCursorLite class, you can easily set a custom cursor for your application or website in flash, you just need to add a line of code.

With the Utils class, you can easily arrange objects ( send it to front or send it to back ), you can add multiple child at once, and multiple event listeners at once, align an object to it’s center, convert from degrees to radians and convert from radians to degrees easily, you can also convert all objects’ position in the stage to round numbers – Round from x=103,05 to x=103 – for example.

Documentation

Code is well documented, all classes, functions, properties and listeners are explained.

Features

  • Scale, rotate and drag objects.
  • Select minimum and maximum size values: based on scaleX / scaleY or width / height.
  • Lock dragging / rotating / scaling.
  • Force Proportional rotating / scaling.
  • Listen for events: ACTIVATE , DEACTIVATE, SELECT , DESELECT, SCALE _START, SCALE _END, ROTATE _START, ROTATE _END, DRAG _START, DRAG _END, SCALE _ENTER_FRAME, ROTATE _ENTER_FRAME, DRAG _MOUSE_MOVE.
  • Dynamicaly controls a custom cursor that you can easily customize.
  • Enable mask mode and set it’s properties: Color and Alpha.
  • Customize handlers’ size and color by just using one command.
  • Select and deselect objects.
  • Transform masked objects.
  • Transform already rotated or scaled objects.
  • EasyCursor and Utils classes included in the package.
  • Hide the specified handles and leave just the ones you want.
  • Transform objects with filters.
  • Change alpha property on-fly while transforming.
  • Custom change properties on-fly using the events dispatched by the Transformer.
  • Transform and object with 9-slice scaling.

Change Log

  • 26 / Oct – Fixed resize and rotation bugs when the handle is out of screen.
  • 26 / Oct – Fixed mouse cursor updating when finished transformation.
  • 27 / Oct – Fixed border disappearing after re-sizing an object that can’t be dragged.
  • 27 / Oct – Fixed handles placement issue.
  • 30 / Oct – Added Keyboard increments.
  • 01 / Nov – Get and set object’s x, y, width, height and rotation values through an instance of the transformer class.

FlashCube©

by
by
by
by
by
by