# Need to add a button to a tweened movie clip

**URL:** https://forum.kirupa.com/t/need-to-add-a-button-to-a-tweened-movie-clip/262555
**Category:** flash
**Created:** [June 6, 2008, 8:50pm UTC](https://forum.kirupa.com/t/need-to-add-a-button-to-a-tweened-movie-clip/262555 "2008-06-06T20:50:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![paulsyhand](https://avatars.discourse-cdn.com/v4/letter/p/9fc29f/32.png) [@paulsyhand](https://forum.kirupa.com/u/paulsyhand)
#### Post date: [June 6, 2008, 8:50pm UTC](https://forum.kirupa.com/t/need-to-add-a-button-to-a-tweened-movie-clip/262555/1 "2008-06-06T20:50:22Z")

</div>

Hello,

I am kind of new at actionscript and I can’t seem to figure out how to get a button to work when it is inside of a tweened movie clip.

Here’s the code… the object “face” contains the buttons.  
I tried to use hitTest but then I loose the nice tween. Thanks in advance for any suggestions.

[INDENT]import mx.transitions.Tween;  
import mx.transitions.easing.\*;

for (var i = 1; i \<= 3; i++) {  
this[“face” + i].onRollOver = function() {  
if(this.\_xscale \< 200) {  
grow(this);this.gotoAndPlay(2);  
}  
else {  
shrink(this);  
}  
}  
}

for (var i = 1; i \<= 3; i++) {  
this[“face” + i].onRollOut = function() {  
if(this.\_xscale \< 200) {  
shrink(this);this.gotoAndPlay(11);  
}  
else {  
grow(this);  
}  
}  
}

function grow(who) {  
var tw:Tween = new Tween(who,"\_xscale",Strong.easeOut,100,110,1,true);  
var tw2:Tween = new Tween(who,"\_yscale",Strong.easeOut,100,110,1,true);  
}

function shrink(who) {  
var tw:Tween = new Tween(who,"\_xscale",Strong.easeOut,110,100,1,true);  
var tw2:Tween = new Tween(who,"\_yscale",Strong.easeOut,110,100,1,true);  
}  
[/INDENT]
