This content has been marked as final. Show 3 replies
I have a related question. Can an ActionScript program running inside the Flash player call a Windows DLL? --Bruce
In theory, you can do what you want, but it is an indirect way of achieving it, and there are some performance/functional issues.
You can make a windows application that is an ActiveX control container, and put the FlashPlayer control inside it. Handle the "FlashCall" event in your windows program (this is fired when your swf calls a custom external function), and then you can use it to load and call whatever .dll function you want.
In practice, from what I've observed, there are some limitations. The graphics performance of the FlashPlayer suffers when embedded this way in a Windows app. Also, if you want to call into the flashplayer sometimes the function calls fail. Having said this, my experience is limited to AS2 implementations; maybe things have improved with AS3.
Anyway, hope this helps. Would be interested to hear your observations if you should try this route.
You can integrate normal Flex application with typical windows program/library but unfortunately AIR does not allow you call function by ExternalInterface API. ExternalInterface API class is not supported in AIR applications.
I wrote some examples how to integrate windows application by emebeding flex application as container.
Populate Adobe Flex with ADO Recordset
Passing XML to Flex by ExternalInterface