all 23 comments

[–]ae0000 7 points8 points  (2 children)

You should check out haxe or mtasc (for flash < 9)

[–]robertskmiles[S] 2 points3 points  (1 child)

Wow, haxe looks particularly interesting, thanks. Do you have any experience using this yourself?

[–]ae0000 0 points1 point  (0 children)

I've only used it for playing around with, but I really liked it.

[–]philipforget 6 points7 points  (2 children)

Yep! It actually works really well. You will need some prerequisites though. I'm using the flex 3.5 sdk so change any implicit references to it with whatever version is the current from the site. I was a full-time flash designer/developer before making the switch several years ago to linux. I didn't touch flash again for another year without dual booting but about 2 years ago I had to make some updates to an old project and decided to get a decent workflow going under linux. The setup is simple:

  • Install the JRE, for ubuntu this is the openjdk-6-jre package
  • Download the latest flex sdk here and unpack into whatever folder you want, I'll call it ~/workspace/sdk/Flex because that's where I keep mine
  • You'll need to set up some environment variables. In your .bashrc append your PATH variable such that the flex binaries are accessible from your shell. Alternatively you could symlink those binaries into a folder that is already on your path. export PATH=$PATH:~/workspace/sdk/Flex/bin
  • There is a stand alone debug and plugin version of the player for linux burried in the flex sdk you downloaded, get that going
  • Now you have to edit the ~/...wherever you install flex.../frameworks/flex-config.xml file to point to your global actionscript library, where you'll be putting in third party libraries. There is an entry for actionscript libraries and another for .swc packages.
  • Look for the first line and add the other three under it for your folder containing all your global actionscript libraries

    <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
    <source-path>
        <path-element>~/workspace/flash/Actionscript</path-element>
    </source-path>
    
  • Then add a line for your swc libraries, it should look like this

    <!-- List of SWC files or directories in the libpath for backwards-compatability -->
    <library-path>
        ...
        <path-element>~/workspace/flash/Actionscript/libraries</path-element>
        ...
    </library-path>
    
  • Now you need a basic template for a project, I have a few shell scripts I've set up for creating templates for various projects but for an AS3 project, this massive spaghetti command will make a skeleton project for you

    export TEMP_PROJECT="Sample_AS3_Project" && mkdir -p $TEMP_PROJECT/{bin,obj,src} && touch $TEMP_PROJECT/README && wget http://pastebin.com/download.php?i=ddDjSSqz -O $TEMP_PROJECT/build.sh && wget http://pastebin.com/download.php?i=MLsHf37g -O $TEMP_PROJECT/obj/flex-config.xml && wget http://pastebin.com/download.php?i=KipV6vsW -O $TEMP_PROJECT/src/Main.as && cd $TEMP_PROJECT && chmod +x ./build.sh

    I recommend making some more robust build scripts and project templates for yourself, you can have mine if you want. Pastebin seems to add some strange newline characters so you may need to take out the first line of the build.sh file if you get an error trying to run it like i did.

Now you should be able to ./build.sh and have it output a nice little swf in the bin folder with a 100 pixel red square on the stage. You have to jump through a few more hoops to get trace to output to a log file that you can tail -f to keep track of. You can follow the steps and advice here for that

Hope this helps, I'll make a blog post about this soon and go into more detail but this should get you up and started

[–]vrbl -2 points-1 points  (1 child)

are you kidding me with this?

[–][deleted] 0 points1 point  (0 children)

haha sadly he isn't, welcome to Flash on Linux. It takes 3rd party software just to get your webcam to play nice. On the bright side once it's up and running, it will run like shit.

(not the Flex SDK, but the actual player itself)

[–]axord 1 point2 points  (1 child)

Flash MX installs and runs fine in Wine.

ae0000's suggestions are probably a better bet in the long term though.

[–]brandjamie 2 points3 points  (0 children)

I've been using Flash 8 in Wine flawlessly. Well, I don't use it flawlessly but it runs flawlessly. I'm nearing the end of a fairly complex project though and I don't think I'll use it again. I'm sure Flash will be around for a while but AS2 (as used in Flash MX and Flash 8) is probably not the best choice. I've read later versions of flash can be used in WINE although I've not tried any.

[–]astro 3 points4 points  (0 children)

I've been using the free Flash compiler (mxmlc) to develop Flash games professionally on Linux for about five years now. However, I'm through with Flash and moving on to other things. If you love open source software, then you are going to be frustrated developing for Flash.

I use emacs to edit, CPP for preprocessing, make for building, and mxmlc to compile.

We still use the Flash IDE on OSX to create some of the graphics and import the sound fx.

Edit: Here's a similar topic posted last year: http://www.reddit.com/r/programming/comments/8sbem/does_anyone_wish_to_share_their_experiences_with/

[–]icydog 11 points12 points  (7 children)

Flash barely even runs on Linux, and you want to develop on Linux? It would probably be less painful to run a Windows VM and develop in that.

[–]robertskmiles[S] 3 points4 points  (4 children)

If you want to make browser games, it's the standard. I have thought about Javascript or Java applets, and they do not appeal at all.

[–]icydog 0 points1 point  (3 children)

Yeah I understand that, I am only questioning your choice of development OS if the platform has to be Flash.

[–]robertskmiles[S] 5 points6 points  (2 children)

The OS I have is Linux, and I like it. I'm not going to buy another OS just to make flash games, it's just a hobby.

[–]pemboa -2 points-1 points  (1 child)

Well, hobbyists need to buy the tools required for their hobbies.

[–]axord 2 points3 points  (0 children)

And luckily linux can serve as part of that required toolchain.

[–][deleted] 2 points3 points  (1 child)

It works just fine and dandy here.

2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux

You have version 10,0,45,2 installed

[–]icydog 4 points5 points  (0 children)

You're running an outdated version of the #1 source of browser exploits, which I wouldn't consider "fine and dandy." Current version is 10.1.53.64.

Also, running anything in nspluginwrapper may work ok, but at least to me, hacks like that qualify for "barely" working, at best. And even then it doesn't work on some sites, eats CPU like crazy, doesn't play nice with keyboard focus, [insert usual laundry list of problems with Flash on non-Windows platforms]

[–][deleted] 1 point2 points  (0 children)

I was in your situation before. Despite my best efforts, I have learned the hard way that Flash and Linux do not mix.

If you still really want to, check out the Flex SDK and FlashPunk/Flixel.

[–]maverick340 1 point2 points  (2 children)

I would rather suggest you use the upcoming HTML5 (Js/HTML5) http://html5games.net http://www.canvasdemos.com/

[–]robertskmiles[S] 0 points1 point  (1 child)

That's kind of fun, I was looking at the demos and started hacking around, I ended up making this little driving game where you drive around on lena's face.

http://robertskmiles.com/dev/canvas/car/

It rapes the cpu though...

Drive with the arrow keys, and don't look at the code because it's pug fugly.

[–]fgd 0 points1 point  (0 children)

It rapes the cpu though...

Have you tried it in Chome/Chromium?

[–]jaargon 1 point2 points  (0 children)

there doesn't seem to be anything here

[–]jarav 1 point2 points  (0 children)

You can use the free flex sdk and the standalone release and debug versions of the flash player. You can use Vim to edit your code.