I'm looking for a solution to skew images. Flash only allows skewing of vector-based objects. I tried to use matrices but could not get a propriate solution. The goal is to do something like a threefold-brochure which folds out in two steps.
Does someone have a hint or example code for this?
UPDATE!
Maybe my message was a little bit wrong verbalised. Flash allows to skew, for example, a rectangle to a rhomboid.
------- -------
| | \ \
| | => \ \
| | \ \
------- -------
That's not the restriction i meant. I'm able to do WYSIWYG skewing like this for vectors and bitmaps. I need to do something like this:
------- |`
| | | `|
| | => | |
| | | ´
------- |´
Based on Bryan Grezeszak answer, i played with transformation movieclips on the linked page. Am i right when i say that there is no possibility to do this with matrices? If yes, are there other possibilities to achieve this?
Thanks =)
EDIT BASED ON YOUR UPDATE: The transformation you specified that you want is exactly what is accomplished with Matrix3D in flash 10. They changed it from a 3x3 matrix to a 4x4 matrix to allow the skewing you are trying to do. If you are using flash 10, Matrix3D is your answer. If not, try out AS3 3D engines such as Papervision or Away3D.
If you are using Flash 10, then look up it's Matrix3D object (ONLY in Flash 10), because it allows even more skewing of the object, actual 3D perspective, etc, prolly exactly what you are looking for :)
Other than that the object's transformation matrix is what does it. It is a flash.geom.Matrix object that can be accessed on any DisplayObject (including Bitmaps) using your_object.transform.matrix;
It can be tricky to get used to, but this is the most comprehensive source I know of for dealing with it: Senocular Matrix Article
That article is for Flash 8, but the functionality has changed almost none into AS3, so it is still a valuable resource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With