# MX Actionscript rotation and scaling

**URL:** <https://forum.kirupa.com/t/mx-actionscript-rotation-and-scaling/13684>\
**Category:** flash\
**Created:** [February 16, 2003, 9:56pm UTC](https://forum.kirupa.com/t/mx-actionscript-rotation-and-scaling/13684 "2003-02-16T21:56:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clown\_Staples](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@Clown\_Staples](https://forum.kirupa.com/u/Clown_Staples)\
**Post date:** [February 16, 2003, 9:56pm UTC](https://forum.kirupa.com/t/mx-actionscript-rotation-and-scaling/13684/1 "2003-02-16T21:56:30Z")

</div>

Hey everyone,

I’m interested in distorting movie clips at runtime based on user input. I know how to rotate - thats easy : clip.\_rotation is a number from 0 to 360. I know how to scale - thats easy too : clip.\_xscale and clip.\_yscale are conveniently independent. But how do you \*SKEW \* a movie clip at runtime??

The best I can come up with is really complicated. If you put a symbol within a symbol and name both ( something like shell and core ), you can squish and rotate them independently, making it possible to distort the clip twice as many ways.

shell.core.\_yscale = 160;  
shell.core.\_xscale = 100;  
shell.core.\_rotation = 45;

shell.\_yscale = 40;  
shell.\_xscale = 100;  
shell.\_rotation = -22.5;

this gives me somewhat the effect i want, but it is not precise, and i want to be able to skew at any angle, not just 45 degrees.

What is the trigonometry behind this? Any math wizzes want to give me a hand?

Thanks!

---

<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:** [February 16, 2003, 11:20pm UTC](https://forum.kirupa.com/t/mx-actionscript-rotation-and-scaling/13684/2 "2003-02-16T23:20:07Z")

</div>

I learned here: [http://www.geocities.com/~dr\_ericlin/flash/indexgeo.html](http://www.geocities.com/~dr_ericlin/flash/indexgeo.html)  
Pretty clever technique 🙂

And that guy obviously knows his Flash :o

pom :cowboy:

---

<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:** [February 17, 2003, 4:39am UTC](https://forum.kirupa.com/t/mx-actionscript-rotation-and-scaling/13684/3 "2003-02-17T04:39:57Z")

</div>

Thanks… you’re right. This guy is amazing.

---

<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:** [February 17, 2003, 5:06am UTC](https://forum.kirupa.com/t/mx-actionscript-rotation-and-scaling/13684/4 "2003-02-17T05:06:32Z")

</div>

Ive done this which you’re welcome to use  
[http://proto.layer51.com/d.aspx?f=636](http://proto.layer51.com/d.aspx?f=636)

theres also one on skewing  
[http://proto.layer51.com/d.aspx?f=487](http://proto.layer51.com/d.aspx?f=487)
