views:

214

answers:

1

Hello everyone,

I am quite new to AS3 and I have never worked with classes, so I am encountering a couple of problems.

I'd like to center a movieclip, have it so that it doesn't scale. And then I'd like to add a background color that stays there no matter how I scale the browser.

Can someone please explain me this in babysteps? Since I don't know how to implement a class and make it work with my fla.

Thank you so much!

J.

A: 

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

debu