0
votes

So I make games with Adobe Flash/Air. Recently been experimenting with making games for mobile devices. I took a simple game I made and did all the steps necessary to get it working on my phone (IOS). Works fine and all but it doesn't resize to fit the screen. I know I could just make my stage height/width fit the screen size of my device but what if the game was played on a phone with a different screen size - it wouldn't fit.

Now I've researched this for days and I found that you had to use: stage.align=StageAlign.TOP_LEFT; stage.scaleMode=StageScaleMode.NO_SCALE;

The problem is that when I use that code I get a compile errors (access of undefined property) for both StageAlign and StageScaleMode...

What am I missing? Is there something I have to import into the package? Again, I'm only using Flash and Air to make my game.

1
Show us the errors. There is always a stage, so there's something wrong in this.. Post some code and errors. - Andrey Popov

1 Answers

0
votes

You must import it to access it.

import flash.display.StageAlign;
import flash.display.StageScaleMode;

In timeline you can omit those imports but they are required in classes;