# Simple code problem Im sure but its got me stuck

**URL:** <https://forum.kirupa.com/t/simple-code-problem-im-sure-but-its-got-me-stuck/231739>\
**Category:** Uncategorized\
**Created:** [July 7, 2007, 9:17am UTC](https://forum.kirupa.com/t/simple-code-problem-im-sure-but-its-got-me-stuck/231739 "2007-07-07T09:17:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zwemg](https://avatars.discourse-cdn.com/v4/letter/z/bc79bd/32.png) [@zwemg](https://forum.kirupa.com/u/zwemg)\
**Post date:** [July 7, 2007, 9:17am UTC](https://forum.kirupa.com/t/simple-code-problem-im-sure-but-its-got-me-stuck/231739/1 "2007-07-07T09:17:02Z")

</div>

Ok, basically I have two mc boxes that are aligned to each others bottom edge, When I click one button it grows and I want the box beside it to move while the other box grows in size.

Below is my code, problem I have is the other box doesnt move, it just grows/ scales the same as the clicked box.  
Both mc’s are 50 x 50px which is why Ive added the redBox\_mc.\_y+50; so it sits directly below the other box.

Can anyone help? Not sure whats going on as I thought the \_xscale method was used to scale things. Here I just want to change the blueBox\_mc position based on the growing redBox\_mc.

test = function(){  
this.onEnterFrame = function(){  
blueBox\_mc.\_x = redBox\_mc.\_x;  
blueBox\_mc.\_y = redBox\_mc.\_y+50;  
}  
}  
test();
