How do I get the real size of the things I'm drawing?

Let’s say I have a real simple program:

package
{
import flash.display.*;

public class Simple extends Sprite
{
	[SWF(width="640", height="480", backgroundColor="#000000", frameRate="30")]

	public function Simple()
	{
		graphics.lineStyle(1, 0x000000);
		graphics.beginFill(0xffcc00);
		for (var i:uint = 0; i < stage.stageWidth / 10; i++)
		{
			for (var j:uint = 0; j < stage.stageHeight / 10; j++)
			{
				graphics.drawRect(i * 10, j * 10, 10, 10);
			}
		}
		graphics.endFill();
	}
}
}

What that is supposed to do, is draw 10x10 squares until the screen is full. Since the size is 640x480, you would assume it draws 64x48 squares. If I open it in firefox however, it draws 168x92 squares, because the stageWidth is set to 1680 and stageHeight is set to 914.

But that doesn’t factor in, that Firefox zooms the .swf by default. So in reality there are only roughly 60x48 of those 168x92 squares on screen, which is again different than the originally estimated 64x48. But I can’t seem to find a way to access in code by how much it was stretched.

And then there is also a blank area to the left of what I draw. I can draw to that by giving negative x-coordinates, but there seems to be no way of finding out how much area I have over there.

Here is what it looks like:

This is all just really confusing. What I would really like is a set of transformations, that when I put in (0, 0) I get the coordinates that I need to draw to to get the real upper left corner of the flash object in the browser. And when I put in (stage.stageWidth, stage.stageHeight), I get the coordinates I need to draw to of the real lower right corner of the flash object in the browser.

I need this because I want to do scrolling terrain, because my terrain is too large to draw all at once. And for that I need to know how much the player actually sees of my terrain. And I would like to use cacheAsBitmap, so I have to stay under 2880x2880. And there seems to be no way of figuring out how large a Sprite really is, as the width and height properties don’t get scaled correctly when Firefox scales my swf. For example the width and height of each square in the .swf above would return 10x10, when they are really roughly 25x25, because they are scaled.