I just started with FlashDevelop and Flixel, and I already have a question. I created this basic hello world:

    import org.flixel.*;
    [SWF(width = "640", height = "480", backgroundColor = "#000000")]; //Set the size and color of the Flash file

    public class HelloWorld extends FlxGame

When I run this "game", using Flash Player, I get a 800x600 window with a white background, even though I specified it's 640x480 with a black background. Am I doing anything wrong?

I am using Flex 4.6.0, and the target platform is Flash Player 10.1. I have the debugger version of Flash Player 11 installed (WIN 11,5,502,146 to be exact).

In the .xml file (found in the obj folder) I found the following:


Changing the size/color through the properties window of my FlashDevelop project does work fine...

It seems to ignore the [SWF(...)] macro entirely: what's going on?

  • \$\begingroup\$ This looks correct. I compared it to some code from when I used Flixel in 2011, and although Game (my version) became FlxGame (your version), everything else looks fine. \$\endgroup\$
    – ashes999
    Commented Jan 24, 2013 at 22:11
  • \$\begingroup\$ Not sure, but usually the meta information [SWF(... should be directly above the class definition. Try removing that blank line in between and retry? \$\endgroup\$
    – bummzack
    Commented Jan 24, 2013 at 22:19
  • 2
    \$\begingroup\$ ... also try to remove the spaces between your equal signs (eg. width="640" instead of width = "640"). Not sure how nitpicky the compiler is when it comes to these meta-tags, but it seems to ignore yours. \$\endgroup\$
    – bummzack
    Commented Jan 24, 2013 at 22:26
  • \$\begingroup\$ @bummzack, hi again ^_^ you're right, the compiler is really annoying with these tags. I've found my answer, posted it below. :) \$\endgroup\$
    – Rudey
    Commented Jan 24, 2013 at 22:29

1 Answer 1


Found it. It was the semicolon (;) after the [SWF(...)] that killed it. Got it rocking now :) I believe the FLEX compiler is to blame here, since tutorials also have this semicolon, they'll probably used the Flash IDE...

  • \$\begingroup\$ Ah, right. This is in case somebody finds a better answer, to keep some appeal for the question. In this case, well, I doubt this will happen ;) \$\endgroup\$ Commented Jan 25, 2013 at 11:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .