GWT2SWF 0.6.0

GWT2SWF intend to provide software bridge between GWT and FLASH/FLEX.
GWT2SWF intend to provide software bridge between GWT and FLASH/FLEX. GWT2SWF project means that using GWT2SWF you will be able to communicate between GWT and FLASH/FLEX. GWT2SWF provides SWFWidget and FlashPlayer version detection.

Quick start

First of all you should download:

GWT2SWF Library
GWT2SWF Hello World - sources for following example

Step 1. Let's create new project in eclipse, name it 'gwt2swf-helloworld'.

Using gwt tool create project

-eclipse gwt2swf-helloworld
-ant gwt2swf-helloworld
-out ~/workspace/java-eclipse/gwt2swf-helloworld

and create new application

-eclipse gwt2swf-helloworld
-out ~/workspace/java-eclipse/gwt2swf-helloworld

Now add new library to project (Eclipse menu-> Project propertis -> java build files -> librarys -> Add Jar -> gwt2swf.jar

Step 2. Refresh Eclipse. You shold see '' in 'pl.rmalinowski.gwt2swf.client' package.

package pl.rmalinowski.gwt2swf.client;

import pl.rmalinowski.gwt2swf.client.ui.SWFWidget;


* Entry point classes define onModuleLoad().
public class GWT2SWFHelloWorld
implements EntryPoint, ClickListener {

private final Button addNewSwf = new Button("Add new SWF");

* This is the entry point method.
public void onModuleLoad() {



public void onClick(Widget sender) {

SWFWidget swfWidget = new SWFWidget("hello.swf",200,150);

// OR
// if you wont to add some variables you can instantine SWFWidget like
// this:
SWFParams params = new SWFParams("hello.swf", 200,150);
params.addVar("bridgeName", "example");
swfWidget = new SWFWidget(params);



Step 3. add
< inherits name='pl.rmalinowski.gwt2swf.GWT2SWF' / >
into your GWT2SWFHelloWorld.gwt.xml. So you gwt.xml should look like this:
< module >
< inherits name=''/ >
< inherits name='pl.rmalinowski.gwt2swf.GWT2SWF' / >
< entry-point class='pl.rmalinowski.gwt2swf.client.GWT2SWFHelloWorld'/ >
< /module >

After all, finally you can lunch projekt. You should see this.

Tip. To check if is flash player installed or if is correct version installed you could write code similary to followed:

PlayerVersion minPlayerVersion = new PlayerVersion(7, 0, 14);

boolean versionIsValid = SWFObjectUtil
if (!versionIsValid) {
if (!SWFObjectUtil.isFlashPlayerInstalled()) {
Window.alert("flash player not installed");
} else {
Window.alert("not valid version of installed " +
"flash player, needed version min: "
+ minPlayerVersion.toString());

What's New in This Release:

· Compatibility with GWT 1.5 has been ensured (but for backward compatibility, Java generics are not used).
· The embedded SWFObject has been upgraded to version 2.0.
· The class SWFParams has been changed to SWFSettings.
· The ability to set SWF attributes and parameters has been added.
· Resizing of SWF has been fixed.

last updated on:
June 13th, 2008, 9:31 GMT
license type:
GPL (GNU General Public License) 
developed by:
Rafal Malinowski
ROOT \ Internet \ HTTP (WWW)
Download Button

In a hurry? Add it to your Download Basket!

user rating 19



Rate it!

Add your review!