views:

704

answers:

3

Is it possible to embed flash in a mono Application?

Preferably would be similar to the way it can be embedded as an ActiveX control in .Net, but anything where somehow the flash commands could bubble up to the Mono application would be fine.

I had assumed that it would be possible to use the web browser to see flash, however I cannot determine how to install the flash plug-in into the WebBrowser control, as I have installed the Flash plug-in via RPM and flash isn't installed in the Mono.Mozilla.WebBrowser control.

I should probably add that the application will be running on Linux...

+2  A: 
strace -eopen -o1.txt mono myapp.exe

Then look in 1.txt and see which files its loading. Try also without "-e" to see all system calls. Then you will be able to know at least if it's trying... Then, with some luck the new display is looking for the plugins in a wrong dir and you are happy.

If you want to know where the rpm stores it's "crap"

rpm -ql flahsplugin

please change the plugin name to the package name you are queering.

BTW: first post in stackoverflow... /me cries a little...

elcuco
+5  A: 

You can host the Flash plugin natively using the NPAPI, however it is a lot of work and a lot of code. Here is the Gecko Plugin API Reference. Basically you have to implement the entire Netscape half of the API that Flash expects. You can look at the Webkit source code to see how to handle most of it.

This is not a simple task, there are lots of undocumented quirks and lots of gotchas along the way. Plan for at least a month or two of work if you go down this path. It is possible, however, as there is the Webkit existence proof.

jeffamaphone
A: 

If you are using GTK#, the easiest way would probably be to use the CIL bindings for GtkMozEmbed to embed a small page that that just contains the Flash object.

Zifre