0

Documentation for the stageWidth property of the stage object states that:

If the value of the Stage.scaleMode property is set to StageScaleMode.NO_SCALE when the user resizes the window, the Stage content maintains its defined size while the stageWidth property changes to reflect the new width size of the screen area occupied by the SWF file. (In the other scale modes, the stageWidth property always reflects the original width of the SWF file.)

But is there any way to affect that original width of the stage, without recompiling swf?

1
  • 1
    what are you trying to do? what problem do you want to solve?
    – J. Holmes
    Apr 22, 2012 at 13:42

1 Answer 1

1

The stageWidth and stageHeight can not be set. They are based on the stagescalemode and the html container.

Or lets say there is a limited huge artboard what is the displayable area in flash(not regarding stageWidth).

If your swf has StageScaleMode.NO_SCALE its stageWidth will tell you the width of its container.And it will always fit its parent html element by showing you more or less of this artboard. But this can not directly be set by as3. To do so you need js.

If you have any StageScaleMode that scales the swf. Then its getting messy because that limited huge artboard gets streched and distrorted to meet the fittings.One pixel in as3 doesnt mean a pixel on screen anymore. But the part of that artbord that is visible will always be the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.