# LOGIC in AS3

**URL:** <https://forum.kirupa.com/t/logic-in-as3/281500>\
**Category:** flash\
**Created:** [February 10, 2009, 12:57am UTC](https://forum.kirupa.com/t/logic-in-as3/281500 "2009-02-10T00:57:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juskin](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@juskin](https://forum.kirupa.com/u/juskin)\
**Post date:** [February 10, 2009, 12:57am UTC](https://forum.kirupa.com/t/logic-in-as3/281500/1 "2009-02-10T00:57:57Z")

</div>

so I want to create a dynamic animation is AS3, that scales and rotates a dragable clip  
as the Y value increases, these are some of the metods Ive tried

onEnterframe listener: this seems to be good for constantly checking the y position, however, I cant think of how to be able to say movieClip, scale and rotate in conjunction with the y position, because the y position can be anywhere from 1-1100, so that can end up leading to a huge scale! Ive also divided the mouseX by 10, no matter what you do, it scales funky. and if you go back, the scale gets really small, I really only want it to scale up not down…

if then statement: I began thinking if I did an if then in an onEnterFrame, there might be somethign there, however, it only checks if if the condition is true, even if I do greater or equal to, it might not be increasing the y, so therefor the scale and rotation wont work.

and hence this is the reason I posted logic in as3 becuase IM missing something logically to change a clips properties based on its Y position, im not asking for anyone to do it, just help me with the logic/thinking behind this esp. in as3

Justin
