Clicky

Flash4j 3.0 GA is here!

Not too long ago we announced the beta release of Flash4j, our Java API for the Flash platform.
Reactions and feedback have been fantastic! Flash4j surpassed, by far, all of our expectations.
We want you thank you all for that!
Today we are excited to announce the general availability of Flash4j 3.0!
With Flash4j 3.0, developers can build high performance web applications with cross-browser compatibility across all desktop browsers.

Easy to use and learn

This major release has given the Emitrom team a chance to take a step back and reconsider existing features and API design. We’ve made a number of significant changes from previous versions to make the library more intuitive to Java developers. The new API looks cleaner and simpler. Button button = new Button("Click me"); button.addEventHandler(MouseEvent.CLICK, new EventHandler() { @Override public void onEvent(Event event) { Alert.show("Hello, Flex", "Greetings"); } }); // center the button button.setCentered();
Not only did we improve the API, starting with this release we are introducing a new way to learn how to use Emitrom's tools.
Welcome the Emitrom Docs and API Examples App (docs.emitrom.com)!



This application contains tutorials and examples on how to use Flash4j.
Visit docs.emitrom.com to interact with it (don't forget to provide feedback :) ).
We will slowly extend the Docs App to support our other tools in the coming weeks. So stay tuned for a lot of exciting things here!

Easy and seamless integration with existing HTML5 Applications

While we believe that Flash is still the best platform when targeting desktop browsers, HTML5 is catching up fast.
Flash4j 3.0 comes with a set of APIs that will help make the transition to HTML smoother and better than native Flash developement based on ActionScript/MXML.
Not only does the toolkit provides and easy way to implement an alternative content for devices where Flash is not installed... package com.emitrom.flash4j.app.client; import com.emitrom.flash4j.flex.client.core.runtime.ExtendedFlexEntryPoint; import com.emitrom.flash4j.flex.client.mx.controls.Alert; import com.google.gwt.user.client.Window; public class Flash4j extends ExtendedFlexEntryPoint { @Override public void onLoad() { Alert.show("Flash is installed, so we can use Flex here", "Flash4j"); } @Override public void onFlashNotInstalled() { Window.alert("I dont support Flash. Give me some HTML5 please :)"); } }

...but it also provides the ability to easily integrate with existing HTML5-based applications. Below is an example where we use it in conjunction with Sencha GXT.



As you can see the integration is seamless.

Adobe AIR Support

Flash4j 3.0 now includes support for the Adobe AIR API. This now gives you the ability to package your applications as standalone desktop apps. This release also contains support for the following API packages

  - Native Windows
  - Native Menus
  - Clipboard access
  - File and Directories API
  - SQLite Database API
  - Networking
  - Native Process API
  - Clientside Excel

In addition, we have implemented an Explorer application providing you with easy-to-use 100 demos that even include their source code to help you in the process



The demo explorer is also part of the download!

Starling Support

Flash4j 3.0 introduces support for the incredible Starling Framework, giving Java developers the ability to write powerful GPU-accelerated 2D Flash Games. The framework will also ship with a real world demo and its source code.


Apache Flex Support

Flash4j 3.0 enhanced its support for Flex by not only rewriting the API from the ground up but by also updating the underlying framework to Flex 4.8 , the official release under Apache . We have also developed a brand new Explorer to bring you more than 100 demos with the source code included


Support for the GreenSock Tweening library

The Greensock library is one of the most powerful tweening and animation library on the Flash ecosystem. We are trilled to announce that this library will be available in Flash4j 3.0, allowing you to write stunning animations with a simple API.
TweenMax.to(myComponent, 1, TweenMaxConfig.create().setHeight(100)).addEventHandler(TweenEvent.COMPLETE, new EventHandler() { @Override public void onEvent(Event event) { Window.alert("Tween complete"); } });

Support for client-side file IO

Being able to read and write files on the client side is a very useful feature for web applications. Flash4j 3.0 improved client-side file generation by supporting generation of PDF and Excel files right within your browser. private void writeFile(String content, String format) { if (format.equalsIgnoreCase("text")) { writeTextFile(content); } else if (format.equalsIgnoreCase("pdf")) { writePdfFile(content); } else if (format.equalsIgnoreCase("excel")) { writeExcelFile(content); } } private void writeTextFile(String content) { Application.get().saveFile(content, "export.txt"); } private void writePdfFile(String content) { PDF pdf = new PDF(); pdf.addPage(); pdf.writeText(content); Application.get().saveFile(pdf.save(), "export.pdf"); } private void writeExcelFile(String content) { Sheet sheet = new Sheet(); sheet.resize(10, 10); sheet.setCell(0, 0, content); ExcelFile excelFile = new ExcelFile(); excelFile.addSheet(sheet); Application.get().saveFile(excelFile.saveToByteArray(), "export.xls"); }

And much more....

As you can see this release contains a significant number of features. It powers a number of other cool aspects that will be showcased in upcoming blog posts. Stay tuned for that! Being a Java developer has never been this fun! We can't wait to see the amazing applications that you will build with the new functionality provided by this release. Flash4j joins the ranks of the Emitrom portfolio as a free and open source product as well.

Get Flash4j from here and go build truly amazing stuff :)

Happy coding!