Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tween bmp transformation

Status
Not open for further replies.

digitalpencil

Programmer
Apr 8, 2001
165
0
0
GB
Hi,

I've been attempting to create a flash app that can tween bmp tranformations using the skewedmoveclip.as class
I've so far managaed to get Flash to skew a rectangular image with the following code:

#include "SkewedMovieClip.as"

var rad = (Math.PI/180);
//
squareMC.setSkew(null, 0*rad);
trace([squareMC._xskew/rad, squareMC._yskew/rad]);
squareMC._yskew = -10*rad;
trace([squareMC._xskew/rad, squareMC._yskew/rad]);
//
squareMC.setSkew(0*rad, undefined);
trace([squareMC._xskew/rad, squareMC._yskew/rad]);
squareMC._xskew = 0*rad;
trace([squareMC._xskew/rad, squareMC._yskew/rad]);

This is working well however, I would like for the transformation to be tweened from a rectangle, to the skewed result.

I'm not sure this is possible with skewedmoveclip.as but if anyone knows how using this class or the sandy distordimage class (or any other methods, fuse etc) then i'd be grateful for the advice.

The following example shows what I'm attempting to do:
 
It is intended to be a movie with several, simultaneous skewing mcs so I don't think intervals will help much.
Know anything about the transformation matrix? I think this should be able to do what I need but it's pretty confusing.. lol.. what isn't.
 
You can use Matrix to skew your MovieClip but still it won't animate it. It's the same as what you have now.

> I don't think intervals will help much.

Why? In order to animate you have to use time based coding ( namely interval). If you don't want to use interval you can use "onEnterFrame" or custom tween classes available (but then they use interval/onEnterFrame internally anyway.)

Kenneth Kawamoto
 
Thanks,
will give that a go then. just figured there be a specific way of doing this, might hav a more in-depth look at sandy, I think this should be able to animate the skewing tweens
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top