Go Back   kirupaForum > Flash > Flash CS4

Reply
 
Thread Tools Display Modes
Old 11-26-2009, 04:20 AM   #1
Scythe
Mwa ha ha
 
Scythe's Avatar
Location USA

Posts 338
Non-affine transformations

I was just reading about how the Matrix class can only apply affine transformations to objects. According to the documentation, "Affine transformations preserve the straightness of lines while transforming, so that parallel lines stay parallel." So how does one apply non-affine transformations?

The effect I want to achieve is like the effect you get when you hold shift and ctrl while dragging a corner in free transform mode. But I want to be able to apply it to movieclips and not just shapes. And I know 3D rotation can achieve a similar effect, but I want to keep it 2D.



This was done by using free transform on shapes in the authoring environment. The black strokes represent where the blue and green squares were before the transformation. As you can see, the midpoint is lower than it was before, meaning everything has been pushed downwards. That's not quite what I'm going for. I'd prefer to just stretch the shape horizontally without moving things vertically at all, but I'd be happy with just about any non-affine transformation at this point.

Is this possible without going so far as to say write a method to map out pixels in a BitmapData object?
Scythe is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 11-26-2009, 03:32 PM   #2
Booradley
Registered User
I recently discovered a class that may help you out.

http://svn2.assembla.com/svn/FlickAI...sandy/display/
Booradley is offline   Reply With Quote
Old 11-26-2009, 10:26 PM   #3
Scythe
Mwa ha ha
 
Scythe's Avatar
Location USA

Posts 338
That's really cool, thank you.

But I'm wondering if there's any way to just set a movieclip to automatically update whatever might be playing inside it according to a non-affine transformation like it does with its transform object. The DistortImage class does a one-time drawing, representing a distorted version of an object as it looks right then. I tried doing the drawing in an enter frame handler, but that got really slow for some reason, and the bitmap didn't seem to be distorting right.

Anybody know of anything else? A vector solution, perhaps?
Scythe is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:19 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com