# Custom class propertyes

**URL:** <https://forum.kirupa.com/t/custom-class-propertyes/309057>\
**Category:** Uncategorized\
**Created:** [May 5, 2010, 9:54pm UTC](https://forum.kirupa.com/t/custom-class-propertyes/309057 "2010-05-05T21:54:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandraxx](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@sandraxx](https://forum.kirupa.com/u/sandraxx)\
**Post date:** [May 5, 2010, 9:54pm UTC](https://forum.kirupa.com/t/custom-class-propertyes/309057/1 "2010-05-05T21:54:30Z")

</div>

i have a class like this:

```auto
package 
{
    import flash.display.Sprite;
    
    public class chatBoxArea extends Sprite
    {
        
        public function chatBoxArea() 
        {
            this.graphics.beginFill(0x8080FF);
            this.graphics.drawRoundRect (100, 100, 100, 100, 10, 10);
            this.graphics.endFill();
            
        }
        
    }

}

```

and in main class when i create new instance with:

```auto
var t:chatBoxArea = new chatBoxArea ();

```

and after that try to chenge x,y,width,height propertyes like :

```auto
t.x = 500; 
t.y = 500;
t.width = 500;
t.height = 500;

```

i got stetch rounded rectangel…my question is how can i create class that can be change dinamicaly witouth streching?

i have tryed overiding setter for x,y,width,height and then graphic.clear() and recreate graphics but same effect.
