# Shape Coordinate Problem

**URL:** <https://forum.kirupa.com/t/shape-coordinate-problem/236208>\
**Category:** flash\
**Created:** [August 18, 2007, 10:54am UTC](https://forum.kirupa.com/t/shape-coordinate-problem/236208 "2007-08-18T10:54:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SGAction](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@SGAction](https://forum.kirupa.com/u/SGAction)\
**Post date:** [August 18, 2007, 10:54am UTC](https://forum.kirupa.com/t/shape-coordinate-problem/236208/1 "2007-08-18T10:54:04Z")

</div>

I’m new to ActionScript and could really use your help.

I’ve created a rectangle as such:  
var filledBar:Shape = new Shape();  
filledBar.graphics.beginFill(0x6699CC, 1);  
filledBar.graphics.drawRect(300, 200, 50, 200);  
addChild(filledBar);

Now I try to later change the height, as such:  
filledBar.height = 300;

It seems to actually move my x/y coordinates in addition to changing the height. Why does it move the coordinates?

Also, when I do a trace of the coordinates after creating the rectangle, it shows up as 0,0 - even though I’ve set them to be 300,200 and that seems to be where it’s actually positioned. Could someone help me out with this issue? Thank you!
