[AS3]
How can I transform a MovieClip to be in the exact same perspective as the image on this lunchbox?
Is it possible using Matrix todo this or is there a better way?
I would love it if you could answer with an example code.
Update
I have to target Flash 9.
Update2
If it’s possible using matrix, can you give me the number to get the right skew, cause I just can’t get it right. I have tried distortiontweener but i can’t get that one to work.
Any other solutions?
Also, if you’re targeting flash player 10, you can just rotate around the x and y axis. FP10 and Flash CS4 support basic 3D built-in.
EDIT
If you can’t use FP10 then you’ll have to look into doing it via a 3rd party library – DistortImage seems like it will do the trick just fine. It is referenced by some of the code in the links below, but this is the cleanest most simple version I can find.
ANOTHER EDIT
It is not possible to to this with flash’s built in Matrix class. This is because flash’s Matrix only supports 3×3 matrices. You need 4×4 to do the kind of distortion you want. you need to do a proper perspective distortion, not just a skew.