0
votes

I'm making a game in AS3, using FlashDevelop. I'm trying to, as the title says, dynamically increase the size of the screen. It's a simple avoider-type game, so one of the upgrades I'm letting the player unlock is more space.

I have my main, and that main has a single child. I'm trying to call an UpgradeScreen() function from that child. I've tried several permutations of stage.stageWidth and stage.scaleX and nothing has worked so far. Based on some of the responses to questions of this nature that I've found it looks like it's going to be more complicated than I was hoping.

So, is what I'm trying possible? Should I have the child call a function in the main instead of trying to do it itself?

Thanks in advance.

1
Is this browser-based or an AIR app? - Josh
It depends on two things: What platform are you trying to deploy to, and what do you mean by changing the screen size? - Panzercrisis
Assuming you mean change the game board size, sure you can change that. The size of the application window is static unless using AIR - Ronnie
If I had to guess, I'd say browser-based. I don't know for sure though, since this is my first as3-based project. - Greg Kritzman
You create your game with the biggest size you want, then you use logical clipping to limit the dsisplayed portion of the game. - Vesper

1 Answers

0
votes

Per the advice of Vesper, I made the project size larger, and used clipping. I'm not a fan of the fact that there's a white border until the screen is at its maximum upgrade, but there probably isn't an easy way to avoid that...

Instead of binding everything by (0,0) and (stage.stageWidth,stage.stageHeight). I am now binding things by (LeftX,TopY) and (myWidth,myHeight) and when I run UpgradeScreen() I subtract 5 from both LeftX and TopY and add 10 to both myWidth and myHeight