As advertised the developers will be able to seamlessly create flash sprites and java objects inside their javascript applications in C# via the jsc ultra offering. What if they could just drop some native source code and be able to reuse them in C#?
At the moment only the HTML web page is converted to DOM building code which looks like this under reflector.
In the future releases the native source codes could be parsed and placed in the correct location based on their namespace for their respective back-end compilers.
Seems like I will need source code parsers to pull it off. First step is to generate a stub. The next step would be to convert the native source to IL. If we go just for the first step, then one can surely benefit from some native language specific syntax constructs.
Update: The second pass would mean that the native back-end compiler does it’s job and jsc will go and decompile JVM or AVM to IL as jsc is not about compiling source to IL.
Then you could consume the AboutApplet.java in your javascript code like this:
42 var Applet1 = new AboutApplet();
43
44 Applet1.Method1(“hello world”);
45
46 var Applet1Element = Applet1.AttachAppletToDocument();
47
48 Applet1Element.style.border = “1px solid red”;
This will create a red java applet in your browser.
The AboutApplet.java should could look something like this:
1 // PromotionWebApplication1.AboutApplet.dll
2 package PromotionWebApplication1;
3
4 import java.applet.Applet;
5 import java.awt.Component;
6 import java.awt.Container;
7 import java.awt.image.ImageObserver;
8 import java.awt.Panel;
9
10 public final class AboutApplet extends Applet implements ImageObserver
11 {
12
13
14 public AboutApplet()
15 {
16 super();
17 }
18
19
20 public final void Method1(String p)
21 {
22 }
23
24 }
Ch
Cool features ahead. Including HTML5 Including an actual installer!
jsc has now a twitter feed!
PS. What about .class, .jar, .swf, .swc? I surely would like to pull media from online .swf files just to be able to recompile them into my own application.
Hey Compiler that flash game there has nice logo and sound, could you go ahead and make them accessible for me in the code? Thanks!
![]()
Tagged: actionscript, flash, java, javascript, jsc, ultra
