# Need help with tween class button

**URL:** <https://forum.kirupa.com/t/need-help-with-tween-class-button/239331>\
**Category:** Uncategorized\
**Created:** [September 20, 2007, 4:15pm UTC](https://forum.kirupa.com/t/need-help-with-tween-class-button/239331 "2007-09-20T16:15:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![protofox](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/protofox/32/4053_2.png) [@protofox](https://forum.kirupa.com/u/protofox)\
**Post date:** [September 20, 2007, 4:15pm UTC](https://forum.kirupa.com/t/need-help-with-tween-class-button/239331/1 "2007-09-20T16:15:36Z")

</div>

i am creating a simple set of a few rectangles stacked on top of eachother (going to be like a stack of postcards) and i want to have the user click on the top rectangle and it moves to reveal the one underneath it. i have it all set up to work except i can’t think of a way to stop it from being clickable after it’s been moved to the side and the 2nd rectangle is revealed. does this make any sense? thanks!

here is my code:

stop();  
card1.onPress = function() {  
import mx.transitions.Tween;  
import mx.transitions.easing.\*;  
new mx.transitions.Tween(card1, “\_x”, mx.transitions.easing.Strong.easeOut, 0, -120, 2, true);  
new mx.transitions.Tween(card1, “\_y”, mx.transitions.easing.Strong.easeOut, 0, -70, 2, true);  
new mx.transitions.Tween(card1, “\_rotation”, mx.transitions.easing.Strong.easeOut, 0, -45, 2, true);  
};
