# scrollRect without Rectangle class

**URL:** <https://forum.kirupa.com/t/scrollrect-without-rectangle-class/305268>\
**Category:** flash\
**Created:** [February 22, 2010, 3:50pm UTC](https://forum.kirupa.com/t/scrollrect-without-rectangle-class/305268 "2010-02-22T15:50:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roland684](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Roland684](https://forum.kirupa.com/u/Roland684)\
**Post date:** [February 22, 2010, 3:50pm UTC](https://forum.kirupa.com/t/scrollrect-without-rectangle-class/305268/1 "2010-02-22T15:50:41Z")

</div>

Is it possicle to use scrollRect without the flash.geom.Rectangle class?

I know the scrollrect can be used like this:

```auto
import flash.geom.Rectangle;
myMC.scrollRect = new Rectangle(10,10,100,100);

```

I need to make a flash which doesn’t extends outside the stage (bacause loading it from another flash will expose anything outside the stage area). Using a mask is an option, but scrollRect seems very interesting because it would be easier and give greater performance.

But I can not import the flash.geom.Rectangle class ☹ (and it seems overkill to import a class just to set x,y,width and height)

How can I use scrollRect without the flash.geom.Rectangle class?
