View Full Version : Distortion by Actionscript
d2ns
October 11th, 2002, 08:30 AM
Hi,
I know it's possible to scale and rotate an object by using some actionscript. Is it also possible to distort an image?
For example; keep the topleft corner and the bottomleft corner of an object at the same position and put the topright and bottomright corner of the same object 25 pixels down.
Is this possible?
toedeloe
Bezzer
October 11th, 2002, 08:40 AM
yeah it is....using the power of triangles...you cut the image in half so that it makes a triangle then u can scale and rotate it so that it will distort...these have been used to enable people to put textures on 3d objects made in flash.
d2ns
October 11th, 2002, 08:49 AM
Aha,
and could anybody give me a hint about dividing squares intro triangles? using as ofcourse...........
Bezzer
October 11th, 2002, 08:50 AM
um i think you would probably have to mask off the diff parts of the pic u dont need for each of them...im working on an example...so just wait a while :) ehhe
d2ns
October 11th, 2002, 08:52 AM
:) okidokie...
pom
October 11th, 2002, 03:26 PM
I'm interested too. Hurry up, man :P
Bezzer
October 12th, 2002, 03:43 AM
hehe sorry...flash stuffed up on me and i hadn't saved...:( so i sorta gave up... um my friends site uses this triangle thing in some of his experiments..his site is http://www.flash-git.net he uses it in elastic image grid or something like that as well as in texturing some of his 3d objects...im sure if u talked to him he would be able to send one of them over...
pom
October 12th, 2002, 04:55 AM
The site didn't work for me (I corrected the typo) :(
Bezzer
October 12th, 2002, 11:37 AM
Originally posted by ilyaslamasse
The site didn't work for me (I corrected the typo) :(
what was the typo?....hehe:)
lostinbeta
October 12th, 2002, 12:18 PM
There was a period in the URL. Even with the corrected typo, when you click the enter button thing to open the pop-up window, the page cannot be found in the pop-up window so it can't be seen anyway.
Scootman
October 12th, 2002, 06:32 PM
is skew a property of objects in actionscript? cuz thats what it sounds like he wants to do...
Bezzer
October 12th, 2002, 09:31 PM
nah there isn't a skew thing in action script as far as i know...
senocular
January 22nd, 2003, 05:32 PM
saw some one viewing this (I guess in a search) so I thought Id post this:
http://proto.layer51.com/d.aspx?f=487
jcs
January 22nd, 2003, 05:57 PM
sen -
question: so if I want to make a flap of a box look like it is flipping over along its z-axis (looking at one side, looking at edge, looking at opposite side), do I run into trouble as I approach 90* (as stated in the "warnings" of your code)?
thanks,
JCS
senocular
January 22nd, 2003, 06:04 PM
well thats not a 3d distort, its a skew. a taper is what would give a 3d distort (one edge getting smaller while another larger) and I guess thats what you are thinking about
the warnings pertain to only a very precice point where the x skew and the y skew match each other in a way to make it screw up a little. Its rare and chances are you wont see it. If I can remember its a divide by 0 issue (or when the values are that close to -0) ... or something... I actually worte the code a while ago and dont remember much.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.