# Distortion by Actionscript

**URL:** <https://forum.kirupa.com/t/distortion-by-actionscript/6592>\
**Category:** flash\
**Created:** [October 11, 2002, 12:30pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592 "2002-10-11T12:30:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![d2ns](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@d2ns](https://forum.kirupa.com/u/d2ns)\
**Post date:** [October 11, 2002, 12:30pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/1 "2002-10-11T12:30:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 11, 2002, 12:40pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/2 "2002-10-11T12:40:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 11, 2002, 12:49pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/3 "2002-10-11T12:49:16Z")

</div>

Aha,

and could anybody give me a hint about dividing squares intro triangles? using as ofcourse…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 11, 2002, 12:50pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/4 "2002-10-11T12:50:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 11, 2002, 12:52pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/5 "2002-10-11T12:52:18Z")

</div>

🙂 okidokie…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 11, 2002, 7:26pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/6 "2002-10-11T19:26:59Z")

</div>

I’m interested too. Hurry up, man 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 12, 2002, 7:43am UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/7 "2002-10-12T07:43:45Z")

</div>

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](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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 12, 2002, 8:55am UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/8 "2002-10-12T08:55:59Z")

</div>

The site didn’t work for me (I corrected the typo) ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 12, 2002, 3:37pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/9 "2002-10-12T15:37:11Z")

</div>

> \*Originally posted by ilyaslamasse \*  
> \*\*The site didn’t work for me (I corrected the typo) ☹ \*\*

what was the typo?..hehe:)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 12, 2002, 4:18pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/10 "2002-10-12T16:18:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 12, 2002, 10:32pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/11 "2002-10-12T22:32:20Z")

</div>

is skew a property of objects in actionscript? cuz thats what it sounds like he wants to do…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 13, 2002, 1:31am UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/12 "2002-10-13T01:31:42Z")

</div>

nah there isn’t a skew thing in action script as far as i know…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 22, 2003, 10:32pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/13 "2003-01-22T22:32:10Z")

</div>

saw some one viewing this (I guess in a search) so I thought Id post this:  
[http://proto.layer51.com/d.aspx?f=487](http://proto.layer51.com/d.aspx?f=487)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 22, 2003, 10:57pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/14 "2003-01-22T22:57:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 22, 2003, 11:04pm UTC](https://forum.kirupa.com/t/distortion-by-actionscript/6592/15 "2003-01-22T23:04:37Z")

</div>

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.
