[SOLVED] Having trouble adjusting the flash window screen size


(Quang Tran) #1

Until now, I’ve had the game at 3x magnification. This the code I have in my Main class constructor:

super(300, 200, 60, false);
FP.screen.scaleX = 3;
FP.screen.scaleY = 3;

Now I’m setting it to 2x magnification, but I’m having trouble adjusting the resulting screen size which now appears too large for the game. Here’s a picture of what I mean:

picture link

I use FlashDevelop, and I’ve tried adjusting both:

  1. Tools->Program Settings->Window Size
  2. Project->Properties->Dimensions

Both to no avail. Does anyone know how I can get rid of the access white space? It becomes problematic when I upload it to FGL, because the game appears overly large and distracting.


(Jacob Albano) #2

You need to add a metatag to your document class.

[SWF(width = "800", height = "400")]
public class Game extends Engine
{
...
}

If you’re using a preloader (which it looks like you are, from the screenshot), don’t worry; you can stack metatags on top of each other and it won’t matter.


(Quang Tran) #3

Thanks! I definitely made some progress with your help. I went ahead and placed the new metatags into my preloader class and my main class.

[SWF(width = "600", height = "400")]
public class Preloader extends MovieClip
...

[SWF(width = "900", height = "600")]
public class Main extends Engine
...

Now when I test my project with “F5” the preloader screen and the game screen are now the same size - which is correct. I still get odd behavior though when I upload the game onto FGL. On FGL, the preloader still appears to be showing up at a bigger size. Any idea as to what could be causing this?

Picture of preloader and game overlayed on top of eachother


(David Williams) #4

On FGL, it’s been a while, but isn’t there a project dimensions thing you can change for the game? That should fix the preloader problem.


(Ultima2876) #5

FGL takes the setting from the SWF file - you can’t set it manually.


(Quang Tran) #6

Yeah, I looked through FGL and I didn’t see any option like that.

I tried it on Firefox and it turned out fine. It turns out I had my Chrome browser at 125% zoom. This would cause the flash border to increase, though the game would not stretch to compensate - hence the weird framing.

It’s not something I notice much, because I guess in most games, the game is stretched automatically to meet the flash border. My case was a bit weirder because my preloader would stretch but the game would not. Went to check out some flash games, and I’m starting to just notice it now.

This game, ‘endeavour’ does not stretch (love this game btw)

This game does stretch

In any case, I’ve got a good understanding of what’s going on now. Next I’ll look into making my game stretch. Thanks for your input guys!