Skip to main content
Participating Frequently
2月 10, 2023 10:50 午前 UTC
解決済み

I have a size set for stage in ActionScript 3.0, but more than the stage size shows

I have made a background that is the exact size of my stage, but I when I hit "test", there is more space on the left and right than should be on my stage. I'm using ActionScript 3.0 and .swf files. I don't know what I did wrong. How do I make the animation only the size of the actual stage?

    このトピックへの返信は締め切られました。
    JoãoCésar17023019
    Community Expert
    2月 10, 2023 11:19 午前 UTC

    Hi.

     

    It's because the default scaleMode value for the stage is "showAll", which means "that the entire application be visible in the specified area without distortion while maintaining the original aspect ratio of the application".

    What it means is tbat the Flash Player or the AIR runtime will resize the stage in way that it always fits proportionally inside of the window like your content was a single video file or bitmap.

     

    You can try to experiment with other scaleMode values, but you will probably want to stick with the default value, I think.

     

    https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html

     

    Example of how to change the stage's scale mode:

    import flash.display.StageScaleMode;
    
    stage.scaleMode = StageScaleMode.NO_BORDER;

     

    Regards,

    JC

    返信数 1

    JoãoCésar17023019
    Community Expert
    Community Expert
    2月 10, 2023 11:19 午前 UTC

    Hi.

     

    It's because the default scaleMode value for the stage is "showAll", which means "that the entire application be visible in the specified area without distortion while maintaining the original aspect ratio of the application".

    What it means is tbat the Flash Player or the AIR runtime will resize the stage in way that it always fits proportionally inside of the window like your content was a single video file or bitmap.

     

    You can try to experiment with other scaleMode values, but you will probably want to stick with the default value, I think.

     

    https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html

     

    Example of how to change the stage's scale mode:

    import flash.display.StageScaleMode;
    
    stage.scaleMode = StageScaleMode.NO_BORDER;

     

    Regards,

    JC

    翻訳