1 person found this helpful
You could try setting the canvas's width and height to window.innerWidth and window.innerHeight to see if that gets you closer to what you want to achieve. In any case, you'll have to change the dimensions in the HTML. Flash isn't going to translate everything for you.
I came to ask about this as well. I'm working on some small microsite I'd like the canvas to fill the viewport. The quick and easy way to do this was:
The problem I'm having is how to position my assets relatively on the stage (e.g x = 50%, y=50%). The other issue is this causes all the elements on the stage to stretch. I'm wondering if its possible to make the canvas fill the viewport, while maintaing the aspect ratios of the assets drawn on it.
There is a resize event, talked about here:
The easiest solution is to put all of your Flash experience into a movieclip, so that on stage there is just that one movieclip. Then when there is a resize event you can scale the movieclip to fit the new area, and if need be you can use code to move elements around the new space.