Hi Gerry,
Can you utilize php as a mediator?

Flash<->PHP<->DLL

PHP eg:
<?php
if (is_file("path/To/yourfile.dll")) {
        // true; we can proceed
        //code to execute dll, format and send results to flash here
} else {
        return false;
}
?>

HTH,
Best,
Karl

On Jul 19, 2011, at 3:06 AM, Paul Andrews wrote:

On 19/07/2011 08:46, Gerry Beauregard wrote:
Hi Paul, thanks for the quick response.

The use case would be to call some CPU-intensive audio signal processing code, most likely written in C++ and packaged as a DLL. The idea is that a SWF (or AIR app) would try to detect the presence of the DLL on the user's machine; if the DLL is present, the SWF (or AIR app) would use the native signal processing functions implemented in it, otherwise it would rely on a simplified lower-quality implementation coded in AS3.
I can't think of any way to do what you want. All the native code workarounds I know of really aren't efficient for real-time calls and the overhead would outweigh the benefit. Be interesting if anyone suggests a method.


-Gerry

On 2011-07-19  , at 15:25 , Paul Andrews wrote:

On 19/07/2011 08:15, Gerry Beauregard wrote:
Hi folks,

Does anyone know whether there's a way to call native code from a Flash SWF or AIR app, for example to call functions in a DLL? Something like Java's JNI but for Flash?
I have never heard of anyone doing that and I know of no direct mechanism to do so.

What is your use-case?


I realize it's possible to read and write local data files from a SWF (using FileReference) or from an AIR app (using the File class), but that's reading and writing data, not running code. I also know it's possible to run C code compiled using Alchemy - but that's not really native code, as Alchemy-compiled code isn't native code, but rather byte-code that runs on the ActionScript VM.

-Gerry
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to