I'm making something akin to a page layout app. I've got
items on a page and although there are some methods for
individually selecting UIComponents and putting scale/rotate/move
handles on them, I have been working on something that does
multi-selection. It does this with a Canvas that is the "Selection"
and then it moves the items to and from this Canvas. It works
Until I start transforming that Canvas.
I had been using Peter Ent's excellent Rotator.as and
Resizor.as classes from his Scrapbook example. They worked great
for single items. Now I'm applying them in what I would think is no
different a scenario, but I'm seeing very odd results. For example,
if I perform a resize first, rotation works. If I start with
rotation, the object disappears. I'm sure it is getting some really
awful transform, but I can't find any truly odd numbers.
The other strange thing that I"m seeing is that as I'm using
a Canvas for my Selection area, it is reporting one width and
height when queried, but then when it draws it is way outside of
the expected extents.
OK so what am I asking here? Basically, I want to know if
it's cool to be working directly on the transform matrix of Flex
components or if I'm asking for trouble. I'm not sure of any other
way to do the stuff I'm trying to do, but my issues are so
confusing right now I've got that sinking "i'm not doing this
right" feeling. I've tried randomly invalidating the display or
size, but it doesn't seem to do much.
Is the object close to x = 0, x = application.width, y =
application.height, or y = 0? The rotate function rotates the
object's corner around a center point. In result to this, the
object may go off the screen, which makes it seem like it suddenly
disappeared. If you resize the object then rotate, I believe the
rotate takes the original size of the object and rotates around
that point. If you resize the object to make it smaller, the
smaller object may rotate around the bigger object's origin.