NOTE: Well, Flash is more or less dead so this probably won't be updated. Check the HTML5 exporting instead.

Compiling the examples for Flash from Windows

Adobe's new Flash C++ stuff (Flascc?) finally lets you pop get your Proton apps up on the web!

Flash version:

You need to update flash:

Get Adobe Flash player

View the RTSimpleApp example (has audio, jpeg loading) in Flash here


It's not a perfect emulation (it's still a work in progress), but all the Proton examples run fine, so it ain't bad either.

NOTE : Proton using Domain Memory and Stage3D acceleration and Adobe has a rule that if your app makes 50k+ you have to pay them 9 percent. Just warning ya. Because of this, I (Seth) will probably be adding other web targets as well instead of depending on just Flash.

Flascc works for OSX or Windows, but I'm only going to cover the Windows setup as that's what I use. It uses Cygwin, which is sort of a fake linux for Windows. But, the Flascc SDK comes with its own version so you don't have to install it separately, like we used to have to do for Android builds.

Step 1: Install some sdks and verify your setup

Before you whip out .swf's of the Proton examples and amaze everyone, make sure the SDK is working.

Ok, it's assumed you've already built things on Windows and understand how Proton works.

Note: If you get error “LLVM ERROR: Error: Unable to launch the Java Virtual Machine.” like I did, then you should try giving Java more memory. I had to reboot for it to work.

If that doesn't work, you can modify 01_HelloWorld\Makefile to add -jvmopt=-Xmx1G to the build commands, so in the end, it would look like this:

T01: check
	@echo "-------- Sample 1 --------"
	@echo && echo "First let's compile it as a projector:"
	"$(FLASCC)/usr/bin/gcc" -jvmopt=-Xmx1G $(BASE_CFLAGS) hello.c -o hello.exe

	@echo && echo "Now lets compile it as a SWF:"
	"$(FLASCC)/usr/bin/gcc" -jvmopt=-Xmx1G $(BASE_CFLAGS) hello.c -emit-swf -swf-size=200x200 -o hello.swf

include ../Makefile.common

	rm -f hello.swf hello *.bc *.exe

But that's not a great solution, because later you really WILL need more memory when you compile debug mode versions of bugger stuff, it's a huge hog.

Step 2: Compiling RTBareBones example

Step 3: How to add a Flash target to your existing Proton game

Misc Notes & Gotchas