Embedding Flash Player in a C++ or Java application?

I would like to embed Flash Player directly inside a C++ or Java application.

I found an article that describes how to do this for C#: http://www.adobe.com/devnet/flash/articles/stock_history03.html

Unfortunately, I have no experience with C#, COM or ActiveX. I need someone to translate this code to C++, allowing me to embed the Flash Player into a Win32 Window. Ultimately I'd like to use this information to embed Flash into a Java application.

I am looking for three main functionalities:

  1. Ability to play a Flash movie
  2. Ability to receive events (such as mouse clicks)
  3. Ability to send events

Edit: I prefer an open-source solution if possible.


Asked by: Brooke928 | Posted: 28-01-2022






Answer 1

I don't know how to embed flash in C++, but Christopher Deckers (of SWTSwing fame) has developed an interesting hack which allows it to be embedded in Java. You can find more information in the Javalobby announcement thread.

Here is an updated link: https://github.com/Chrriis/DJ-Native-Swing

Answered by: Melanie305 | Posted: 01-03-2022



Answer 2

I gave the same answer not long ago. Check out SWHX:

http://haxe.org/com/libs/swhx

http://code.google.com/p/screenweaver-hx/

http://code.google.com/p/screenweaver-hx/source/browse/trunk/src/np_host.c

Cheers!

Juan

Answered by: Marcus990 | Posted: 01-03-2022



Answer 3

If it has to be open source I'd consider Gnash, an open source flash implementation.
It works on all major platforms, supports most multimedia codecs and is supposed to be embeddable in applications through nsapi.

Answered by: Anna350 | Posted: 01-03-2022



Answer 4

If you want to go with a commercial solution, I'd recommend Scaleform GFx. It's not cheap, though, but it's damn good.

Answered by: Dainton807 | Posted: 01-03-2022



Answer 5

One simple way to create a Flash player in your window: AtlAxCreateControlEx.

To receive and send events, you will need a sink: AtlAdvise. You will need to define the functions receiving events on the ActionScript (i.e. Flash) side too.

Answered by: Rafael784 | Posted: 01-03-2022



Answer 6

What you should use is Netscape Plugin API. It's native and it's what all the good browsers use to load flash player plugin. While the actual flash player is not open source, this API is.

If you're not gonna ship a copy of flashplayer with your app:

Your app should check at runtime for flash player and should alert the user if it doesn't find it (usually by giving a link to Adobe to download it). Flashplayer plugin is usually installed at %AppData%\Mozilla\plugins on Windows.

Answered by: Emily705 | Posted: 01-03-2022



Answer 7

Take a look at FlashDX. It is open-source and free.

Answered by: John478 | Posted: 01-03-2022



Answer 8

I personally haven't tried this but say in case of SWT/Java you could embed SWT browser window in you SWT/Java application and in the browser view you could put content with flash content, then communicate say with Merapi bridge with flash movie and java.

Answered by: Tara952 | Posted: 01-03-2022



Similar questions

apache flex - Embedding a Flash UI in a Java application

What's out there that lets you do this? Are there any OSS projects or maybe something a little more popular than this: http://www.jpackages.com/jflashplayer/ ? This does exactly what I'm suggesting (i.e. cuts out the need for Swing UI for the most part) but for a number of reasons I'd be interested in any better alternatives. Are there any? Any alternati...


Embedding CKEditor in SWT Java application in Linux

I'm having a problem with CKEditor not functioning properly. I have an SWT Java app running in Ubuntu. The app uses a Browser object to display an HTML page in the project which does nothing but display a CKEditor instance. If I open the HTML page in Firefox, CKEditor renders OK, and everything works. If I run my Java app through Eclipse, the widget displays the HTML page, ...


Embedding the Lua shell into a Java Application (LuaJava)

I am working on a app, It has a GUI (But not Java swing and JFrame stuff) I want to incorporate the Lua shell into the GUI. LuaJava doesn't have good documentation (or atleast for me) on how to do this.


java - Embedding a jre into WInrun4j only once for installer and application

For installation of my Windows desktop application I create an installer using izpack and then call it from an exe using winrun4j, also part of the izpack installation add another winrun4j wrapper for actually running the application once installed. The trouble is that for the win4runj.exe to work it needs to be using the correct Java type, i.e if exe is 64bit it must run 64 bit jvm, if exe is 32 bit it must run 3...


java - Embedding GWT widget in JSF application

In an existing application (JSF) I would like to replace a widget with a one implemented in GWT. I also want to reuse existing logic implemented in managed beans. Logic on the server needs more then just data from the widget to work (so it needs everything what is being submitted by the user's action) - I cannot just use GWT-RPC or similar mechanism (because I won't get JSF data). The question is: how to pass data...


Embedding Gecko engine into a Java desktop application

I'm currently doing some research into the possibility of embedding the Gecko engine into a Java desktop application. I've seen some tools available such as JavaXPCOM but I'm more interested in the limitations of this. I need to have access to the inner workings of the Gecko engine such as how HTML and CSS are combined to render the web page. The stem of my research is to find a way, using Gecko, to group certain...


Embedding Log4j and AOP For Exception Logging In Java Swing Application


macos - Embedding a JRE in a Swing application for Mac OS X

I must ship a swing application with an embedded JRE. A zipped archive with application + JRE + .bat/.sh did the trick for Windows and Linux. Users download the zip, unzip it, and launch the application. Perfect. But now, I must provide the same thing for Mac OS X. I have read / was told a lot of different things on that matter (forbidden to distribute a JRE on Mac, the contrary, there is always a JRE on Mac, etc.....


java - HSQLDB: Embedding Text table within application jar file

I want to embed a HSQLDB database within the application jar file. I'm using a text table. I know I can connect to the database using jdbc:hsqldb:res: protocol to connect to the database within jar file. But how do I specify the source of the table in .script file? SET TABLE PUBLIC.MYTABLE SOURCE '<what_path_do_I_specify_here>'


java - Embedding DITA Open Toolkit in a php based application

We are looking to integrate DITA in our web application, which in an E- Learning platform. The DITA Open Toolkit processes all files using java. Wee are looking for a solution that allows us to work with the DITA content on the fly from a php - based application. Does anyone know of any php


windows - IE6 generated strange worksheet name when doing export from java application

I am encountering error like test(10)[1].csv file cannot be found at C:\Documents and Settings\Ron\Local Settings\Temporary Internet Files\Content.IE5\PQ0STUVW When trying to do export of CSV file using the following codes. Anyone have any idea what could be wrong? This issue does not occur in IE7 / Firefox and is only specific to IE6. response.setContentType("applicati...


java - How best to implement user selectable variables in web application

I have a Java based web-application and a new requirement to allow Users to place variables into text fields that are replaced when a document or other output is produced. How have others gone about this? I was thinking of having a pre-defined set of variables such as : @BOOKING_NUMBER@ @INVOICE_NUMBER@ Then when a user enters some text they can specify a variable inline ...


java - BIRT in a desktop application

Did someone ever used a BIRT report in a desktop application. I'm comming from the .NET environment and there you can use Crystal Reports to show reports in desktop apps. Is this possible with BIRT too, without having to set up a server environment? Can you give me some advice how to reach this goal? Thanks in advance.


which library better for faster java application swt or swing?

which library better for faster java application swt or swing?


java - Which is the best Open source application server?


java - Access spring bean that is exposed using http invoker from GWT application

Can I access spring bean that exposed using http invoker (server) from GWT application (client)? If so is there any example / tutorial for that?


How to close a Java Swing application from the code

What is the proper way to terminate a Swing application from the code, and what are the pitfalls? I'd tried to close my application automatically after a timer fires. But just calling dispose() on the JFrame didn't do the trick - the window vanished but the application did not terminate. However when closing the window with the close button, the application does terminate. What should I do...


java - How best can I isolate my application from an unreliable database?

I have a Java SOAP data service which sits on top of a Sybase database which, for reasons out of my control, has unreliable performance. The database is part of a vendor package which has been modified by an internal team and most of the issues are caused by slow response times at certain times of the day. The SOAP service provides data to a calculation grid and when I request data, I need the response time to be ...


java - Netbeans GUI Designer & Fixed-Size Application Panels

I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size. When I start a new GUI project in NetBeans, I set the properties of the main panel for min/max/preferred size to 800 x 600, and the panel within the 'Design' view changes size. ...


How do I create a "Hello World" application in java for an iphone?

I'd like to create a basic "Hello World" style application for the IPhone using Java - can anyone tell me how?






Still can't find your answer? Check out these amazing Java communities for help...



Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)



top