tags:

views:

562

answers:

7

Is there any way of making c++ gui applications that include .swf?

The swf file are pretty small and easier to make than gif or other kind of animations so it would be nice to be able to include them.

Some recommendations of a library, free or even open source...

A: 

i heard something about a library called swiff it was used for the Battlefield 2 menus but it's not opensource afaik.

Annerajb
A: 

Yes there is: SWFDEC i used it a few years ago. I had some problems handling interactive SWF's, however I am not sure if it was due to me or due to the library. In any case, swfdec claims to support Youtube videos now. So I am sure it can handle simple animations.

Yogi
+1  A: 

So... I'm not a c++ person, but I am a flash / flex person, and I've worked on the flash side of projects that have done this.

I think you might find this: http://www.rohitab.com/discuss/lofiversion/index.php/t29239.html

and maybe this of help: http://www.codeproject.com/KB/cpp/FlashGui.aspx

You should be able to interact with the swfs just fine, and you'll use ExternalInterface to communicate with them.

quoo
A: 

You can host the Flash player itself in your app. You just have to implement the webbrowser side of the plugin architecture you choose. You have two choices, Netscape style plugins and ActiveX. If you only want to run on Windows, hosting it as an ActiveX control is very straightforward. If you want to run cross platform, you have to implement the browser side of the NPAPI plugin stuff, which is actually fairly involved.

jeffamaphone
A: 

I know this does not answer your original question of having a swf in a C/C++ program but you can have c/c++ in your flex/air app with alchemy from adobe labs.

from the website "The C/C++ code is compiled to ActionScript 3.0 as a SWF or SWC that runs on Adobe Flash Player 10 or Adobe AIR 1.5."

http://labs.adobe.com/technologies/alchemy/

AndrewB
A: 

Not free or open-source, but Scaleform GFx is a commercial cross-platform Flash player.

Adam Rosenfield
A: 

Awesomium and the other websites from this guy are just what you need.

  • interpret html/javascript/css - via Chromium - the base of the Chrome web browser from Google.
  • plays flash content
  • C++
  • free
  • open-source
  • awesome

It generates a texture (a 2D image) from web content ( html/javascript/css + flash! ). Then you can use as you want like in this demo. In this video you can see that Youtube is displayed on a texture that is used on a 3D quad mesh. You can download the demo too.

Some people are using it to replace their GUI system. See AkaRUI too.

Klaim