views:

38

answers:

4

I am working on an application that uses raster images, so it only looks good at native resolution.

Is there a way to force the graphics to never be scaled?

It would need to do this no matter where it is running.

A: 

You can set the StageScaleMode to NO SCALE , but you can also define a set swf width & height , these dimensions can be both define in your code but also in your HTML embedding code.

When you say , no matter where it is running, it also means you must have some form of control over the swf file embedding method.

PatrickS
A: 

stage.scaleMode = StageScaleMode.NO_SCALE will stop everything in the swf from being scaled. There are other options too.

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/Stage.html#scaleMode

This is set in the swf so it will work wherever you put your swf. The swf will, however, be cropped if the dimensions set are smaller than what you have made the swf.

Joony
+1  A: 

@Joony: It's not method, it's property: stage.scaleMode = StageScaleMode.NO_SCALE.

Miha
Correct. Not sure what I was thinking.
Joony
+1  A: 

Use the scaleMode property along with the stage.align property to get what your after.

There are also some great resources out there for creating fluid layouts with no-scale set. Try Flash Fluid Layouts And Stage Resize In AS3.

TandemAdam