If I've followed you correctly, you want to have your swf file in the centre of a webpage, to change the background colour, and to stop the swf from stretching if you drag the boundaries of the web browser around?
If so, your question is a more HTML related, as none of that can be accomplished through ActionScript. If what you want to do is position your swf inside an HTML file correctly, you can make Flash export the HTML file for you (assuming you're using the Flash IDE).
Here's a link that'll guide you through the process of doing that, it's very clearly written: http://www.w3schools.com/flash/flash_inhtml.asp
To change your web page's background colour, see this site: http://www.tizag.com/htmlT/bgcolor.php
Once you've got that HTML file exported from Flash, you can check how it will align your Flash swf to the rest of the webpage. Somewhere in the code should be something like align="left"
, and you can change that to centre, right, etc.
Hope that helps,
debu