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

12,953

Solution 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

Solution 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

Solution 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.

Share:
12,953
Gili
Author by

Gili

Email: cowwoc2020 at gmail dot com.

Updated on June 21, 2022

Comments

  • Gili
    Gili almost 2 years

    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.

  • Daniel Spiewak
    Daniel Spiewak over 15 years
    Great, now that the question has been edited to only refer to C++, my answer sounds stupid and OT. :-)
  • Gili
    Gili over 15 years
    Sorry ;) I was hoping to make the question easier to answer... Great links. Unfortunately Christopher uses SWT to achieve this. It doesn't look like his NativeSwing is interoperable with normal Swing components (which I was hoping to use).
  • Daniel Spiewak
    Daniel Spiewak over 15 years
    Actually, it is interoperable, that's the whole reason he did it. :-) You can of course always use SWT by itself, but if you want to embed native stuff like a browser, Windows Media Player or a flash player within Swing, DJ Swing is the way to go.
  • Gili
    Gili over 15 years
    Wow, you're right! That's pretty huge... I'm surprised this hasn't made big news in the Java community. At least I didn't hear about it :) Thanks a lot for this link. You've literally saved me weeks of work.
  • Gili
    Gili over 15 years
    How can you do this? Can you provide some code sniplets to demonstrate this?
  • pullCommitRun
    pullCommitRun about 4 years
    Wow ! This is great. The above link does not work. Here > Refer readMe.md github.com/Chrriis Get the DJ Native Swing distribution on SourceForge.