# Scriptable Skew

**URL:** <https://forum.kirupa.com/t/scriptable-skew/152711>\
**Category:** flash\
**Created:** [June 26, 2005, 11:45pm UTC](https://forum.kirupa.com/t/scriptable-skew/152711 "2005-06-26T23:45:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bandinopla](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@bandinopla](https://forum.kirupa.com/u/bandinopla)\
**Post date:** [June 26, 2005, 11:45pm UTC](https://forum.kirupa.com/t/scriptable-skew/152711/1 "2005-06-26T23:45:06Z")

</div>

Hi… if you don’t see the scriptable skew tutorial here is the link: [http://ericlin2.tripod.com/skew/skewt.html](http://ericlin2.tripod.com/skew/skewt.html)  
now, if you understand it, PLEASE PLEASE, tell me… bicouse I have problems putting this in my brain:

[…]  
_[size=2][color=DimGray]var angleP2 = Math.atan2(ptW.y-pt0.y, ptW.x-pt0.x);  
var angleP1 = Math.atan2(ptH.y-pt0.y, ptH.x-pt0.x);  
var dAngle = (angleP1-angleP2)/2;  
var arm = Math.sqrt(2)/2/Math.cos(dAngle);  
// original a 100x100 model , now use 1x1 model  
obj.\_rotation = (180/Math.PI)_(angleP1-dAngle);  
obj.mc.\_rotation = -45;  
obj.\_yscale = 100\*Math.tan(dAngle);  
obj.mc.\_xscale = distance(ptW, pt0)\*100/arm/mcW;  
obj.mc.\_yscale = distance(ptH, pt0)_100/arm/mcH;[/color][/size]_  
[…]

Thanks.

BnPLA.F { [www.bandinopla.com.ar](http://www.bandinopla.com.ar)
