This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JavaFX and the fly likes Run a flash file(.swf) in javafx Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "Run a flash file(.swf) in javafx " Watch "Run a flash file(.swf) in javafx " New topic
Author

Run a flash file(.swf) in javafx

Ruturaj Deshpande
Greenhorn

Joined: Nov 13, 2013
Posts: 3
Hello I'm new to this forum and also new to JavaFX.
In my project, I need to run a .swf file embedded in a JavaFX stage. I also need to update database after running the flash file. So a standalone flash player is not an option.
Any solution?
John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 131
    
    9
Use Java 8 with a SwingNode and the DJ project.
I've never tried this combination, it may or may not work.

The JavaFX API itself does not directly support embedded Flash (hence the round-about JavaFX/Swing/embedded flash player recommendation).

I'd say, in general, mixing Flash and JavaFX is one of those not really recommended things, so try it only if you must.

http://djproject.sourceforge.net/ns/
https://jdk8.java.net/download.html
http://download.java.net/jdk8/jfxdocs/javafx/embed/swing/SwingNode.html
Ruturaj Deshpande
Greenhorn

Joined: Nov 13, 2013
Posts: 3
Yes I'd looked at these alternatives but jdk 8 stable release is not available yet.
Also the target platform will need to be upgraded to jdk 8 which is not preferable.
So thanks but let me know if there are other alternatives.
John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 131
    
    9
There are no alternatives.
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 489
    
    5
Maybe try converting your SWF to HTML5 using something like this and show it in WebView?
Just an alternative approach - I've not tried it out.
Ruturaj Deshpande
Greenhorn

Joined: Nov 13, 2013
Posts: 3
Converting to HTML5 is good idea but the tool you mentioned does not support ActionScript I think
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Run a flash file(.swf) in javafx
 
Similar Threads
SWF contents are not visible when navigating through Servlet.
.swf file is not loaded in my machine
URL-Pattern, Internet Explorer and Flash Videos
Why should integrate Tomcat with IIS for website
Run flash files in Tomcat6.0