# Background color

**URL:** https://forum.kirupa.com/t/background-color/23310
**Category:** Uncategorized
**Created:** [June 16, 2003, 10:05am UTC](https://forum.kirupa.com/t/background-color/23310 "2003-06-16T10:05:56Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tstefan](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@tstefan](https://forum.kirupa.com/u/tstefan)
#### Post date: [June 16, 2003, 10:05am UTC](https://forum.kirupa.com/t/background-color/23310/1 "2003-06-16T10:05:56Z")

</div>

I would like to know if there is a way to change movie bacground color with action script in flash MX

thanks.:goatee: :goatee:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2003, 10:36am UTC](https://forum.kirupa.com/t/background-color/23310/2 "2003-06-16T10:36:32Z")

</div>

it’s not like you actually change the background color… but it works pretty good. 😛

```auto
changeBackground = function (hex) {
	_level0.beginFill(hex);
	_level0.moveTo(0, 0);
	_level0.lineTo(Stage.width, 0);
	_level0.lineTo(Stage.width, Stage.height);
	_level0.lineTo(0, Stage.height);
	_level0.lineTo(0, 0);
	_level0.endFill();
};
changeBackground(0xCC0000);

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2003, 11:43am UTC](https://forum.kirupa.com/t/background-color/23310/3 "2003-06-16T11:43:22Z")

</div>

I will be more precise.  
Your’s example draw’s a square and than fills it with color.  
In fullscrenn you can still see the old movie clip color like a border, I would like to change a movie clip background color because the movie is in full screen.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2003, 12:00pm UTC](https://forum.kirupa.com/t/background-color/23310/4 "2003-06-16T12:00:00Z")

</div>

```auto
changeBackground = function (hex) {
	var xres = System.capabilities.screenResolutionX, yres = System.capabilities.screenResolutionY;
	_level0.beginFill(hex);
	_level0.moveTo(-xres, -yres);
	_level0.lineTo(xres, -yres);
	_level0.lineTo(xres, yres);
	_level0.lineTo(-xres, yres);
	_level0.lineTo(-xres, -yres);
	_level0.endFill();
};
changeBackground(0xCC0000);

```

that should cover the whole screen.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2003, 12:07pm UTC](https://forum.kirupa.com/t/background-color/23310/5 "2003-06-16T12:07:59Z")

</div>

Thanks kax!!  
:thumb: :thumb:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2003, 12:09pm UTC](https://forum.kirupa.com/t/background-color/23310/6 "2003-06-16T12:09:06Z")

</div>

you’re welcome. 🙂
