Make sure your content isn't scaled:
stage.scaleMode = StageScaleMode.NO_SCALE;
This will make Flash treat its display area as an absolute size, so that when you expand its container it will have more pixels to play with. Read about scalemodes here.
Addendum: based on your comments, a quick refresher on scaling is in order. There are (only!) three things that affect how your Flash content scales:
- Container size (i.e. the size of your embed tag if you're using a browser, or the size of the Flash Player window if you're testing the SWF locally)
- Stage size (i.e. the size of your stage at publish time - the size you see in the authoring tool's Property Inspector when you don't have anything selected)
- Scale mode (which as you noticed, is a global property - there's only one Stage, each movie clips just has a reference to it)
What happens is this: if the scale mode is set to "no scale", then Flash completely ignores the Stage size, and simply displays your content unscaled. If your scale mode is anything other than "no scale", then Flash scales your content so that the Stage size matches up to the Container size. (The different scale mode settings just control whether Flash changes the aspect ratio, and whether it matches the inner or outer dimensions when the stage and container have different aspects.)
Now here's the tricky bit. If you want your content to behave differently when the container changes size (and that's what happens when you go fullscreen), you need to use "no scale". The reason is, when Flash is handling the scaling, your content always "thinks" that the Container size is equal to the Stage size. That is, if your stage size was 800x600, and your container size enlarges to 1024x768, Flash tells your content that the container is still 800x600, and scales up whatever your content shows. If you use "no scale", then Flash tells your content the real container size and assumes you're going to do your own scaling.
Those are the basics. Now moving on to solving your problem, here's what you probably need to do.
- Make sure you have the scale mode set to no scale.
- When you load in your content, scale it yourself to however large you'd like it to be. You can query
stage.stageHeight
and stage.stageWidth
to find out the current container size.
- Register to receive events when the stage size changes, and when that happens, re-scale your images to however you'd like them to display.
Here's sample code to get you started for the third point:
stage.addEventListener( Event.RESIZE, onStageResize );
// ...
function onStageResize( e:Event ) {
myImg.width = stage.stageWidth;
myImg.height = stage.stageHeight;
// or whatever
}
Hope that helps!