# scale9Grid Error

**URL:** <https://forum.kirupa.com/t/scale9grid-error/258317>\
**Category:** flash\
**Created:** [April 23, 2008, 1:01am UTC](https://forum.kirupa.com/t/scale9grid-error/258317 "2008-04-23T01:01:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trilec](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@trilec](https://forum.kirupa.com/u/trilec)\
**Post date:** [April 23, 2008, 1:01am UTC](https://forum.kirupa.com/t/scale9grid-error/258317/1 "2008-04-23T01:01:22Z")

</div>

Does anyone know why this error if no graphics present

eg:

```auto
var square:Shape = new Shape();
square.graphics.lineStyle(20, 0xFFCC00);
square.graphics.drawRect(0, 0, 100, 100);

var grid:Rectangle = new Rectangle(20, 20, 60, 60);
square.scale9Grid = grid ;

addChild(square);

```

\*\*  
eg with error  
\*\*

```auto
 var square:Shape = new Shape();
var grid:Rectangle = new Rectangle(20, 20, 60, 60);
square.scale9Grid = grid ;

addChild(square);

```

error

> ArgumentError: Error #2004: One of the parameters is invalid.  
> at flash.display::DisplayObject/set scale9Grid()  
> at Untitled\_fla::MainTimeline/frame1()

\*\* Thanks  
T  
\*\*
