# Drage & Drop - Dynamic Area!

**URL:** https://forum.kirupa.com/t/drage-drop-dynamic-area/232966
**Category:** flash
**Created:** [July 19, 2007, 3:00am UTC](https://forum.kirupa.com/t/drage-drop-dynamic-area/232966 "2007-07-19T03:00:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![artriste](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@artriste](https://forum.kirupa.com/u/artriste)
#### Post date: [July 19, 2007, 3:00am UTC](https://forum.kirupa.com/t/drage-drop-dynamic-area/232966/1 "2007-07-19T03:00:00Z")

</div>

Hi,

I was working on a website with a draggable menu, when I saw a post about full screen flash website. (See the third code) My menu used to have an area defined like this:

```auto
menu.onPress = function() {
    startDrag(this,false, 0, 0, 700, 600)
}

```

Then after I tried to turn my initial website into a FullScreen flash website, I realised the draggable area had to be constantly updated. I tried this but in vain:

```auto
menu.onPress = function() {
     startDrag(this,false, Stage.width, Stage.height, Stage.width-Stage.width, Stage.height-Stage.height)
 }

```

Any idea of how this could be done?

The code was from the guys on this thread:

> **[100% width and height](https://www.kirupa.com/forum/showthread.php?t=268747)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

  
and looked something like this

```auto
//stage properties
Stage.align = "TL";
Stage.scaleMode = "noScale";

//set initial positions
backoverlay._height = Stage.height;
backoverlay._width = Stage.width;
backoverlay._x = 0;
backoverlay._y = 0;
contentbox._x = Stage.width/2;
contentbox._y = Stage.height/2;

// end initial position setting

//creates a listener that checks to see if the browser window is resized
sizeListener = new Object();
sizeListener.onResize = function() {
// change movieclip properties when the window is resized.
backoverlay._height = Stage.height;
backoverlay._width = Stage.width;
contentbox._x = Stage.width/2;
contentbox_y = Stage.height/2;
};

Stage.addListener(sizeListener);
} 

```
