Background color

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

thanks.:goatee: :goatee:

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

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);

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.

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.

Thanks kax!!
:thumb: :thumb:

you’re welcome. :slight_smile: