A year or two ago, I wrapped flash with gwt with relatively little
work.

in flash: expose your IO methods that you want gwt to access by adding
them to the root window.
in gwt: expose any IO methods you want flash to access by doing
$wnd.MY_IO = {
'method1' : function(a){@com.mydomain.someStaticMethod(Ljava/lang/
String;Lcom/google/...JavascriptObject;)(a, this.arguments);}
}

Now, you need to hook you static IO methods exported into common
window to global instances that do your work, AND you need a common
way of detecting when both sides of the IO have completed loading.  I
recommend having each one make a $wnd.MY_IO.onDoneGwt = and
$wnd.MY_IO.onDoneFlash, and when each side sets their init() methods,
check for the other, if both there, run both.

I'm sorry for the lack of details on flash or code to use; there was
an NDA on the project.  You can look up how to attach methods in JSNI
for gwt, and for flash you are on your own.  It can be done, just use
raw js in a window.GLOBAL to let flash talk to gwt and/or vice versa.
Ray cromwell wrote a gwt-exporter library that can be used to export
java classes to global $wnd instances...  Although in experience,
manually setting $wnd.method=function(a){
@com.domain...someStaticInstance.@com.domain.clazz.someMethod(Ljava/
lang/String;)(a);
}
If you are adventurous, try $wnd.method =
instance.@com.domain.someMethod(Ljava/lang/String;);


Good luck!!!

If anyone is interested in a project that melts svg and flash together
into gwt make a multimedia webapp, drop me a line
x AT aiyx DOT info.  I'm reviving an old project of my own and will
write a new implementation that exposes some flash functionality
directly in gwt {and won't be covered by nda ;-}.

Recent googling suggests the source code of http://code.google.com/p/gwt-voices/
has an existing cross-flash implementation in the source, if you're
willing to scour. =}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to