Ludicrous Software

SWF2JAR: I Can’t Quit You

One of the most exciting parts of Project Capuchin is the ability to bundle up a SWF into a JAR package and be able to install Flash Lite content just as you would any JME content. Building content for mobile devices using Flash Lite is a piece of cake compared to actually distributing it, so this is a welcome step. An indication of how important this is, I think, can be found in the SWF2JAR tool that SE has made available.

The sole purpose of SWF2JAR is to take your SWF and create that JAR file. You can add a custom icon and set other parameters, click the button and you get a nice little installable file. You don’t have to install Eclipse or know anything about Java. You can’t use SWF2JAR if you’re transferring data between Flash Lite and Java (i.e., you’re using Capuchin to access data/features on the phone, like the accelerometer); if you’re doing that, you need to use Eclipse to package your content.

Given that, my assumption has been that the main target for SWF2JAR are the Flash Lite developers who have simply developed a piece of “stand-alone” content and want to bundle it for distribution. So I figured I’d take Poker Solitaire, run it through SWF2JAR, and have a nicely installable game on my hands.

Which I did, but only one problem: it seems that my in-game ‘quit’ button no longer works, so I have to force quit the game using the “Running apps” window. My guess is that by default fscommand2("Quit") isn’t transmitted to the Java wrapper. I wonder if this sort of thing would constitute “transferring data” (i.e. the request to quit) from Flash Lite to Java, which implies that you’d be required to use Eclipse for packaging.

Perhaps I’m just missing something obvious. But if I’m right, I think this significantly limits the usefulness of SWF2JAR, in my mind, which you’d think would account for Flash Lite’s method of quitting an application. Further research is required.

(Anybody had success with SWF2JAR? Anybody recommend a good JME book or two?)