How to use ActiveXObject in AIR,or call js(with ActiveXObject) in AIR
i do this:
html.runtimeApplicationDomain = ApplicationDomain.currentDomain;
public function aaa(evt:Event):void
html.window.getSomeDataFromActiveXObject(); //there will break
I got this resault:
ReferenceError: Can't find variable: ActiveXObject.
I think can't call JS with ActiveXObject in AIR......
but I realy need to use ActiveXObject to get USB Key info . so, What should I do?
The HTML engine that's included in AIR is based on WebKit, which doesn't run ActiveX controls. In addition, AIR has a restriction that you can't use any plugins within the HTML content except for Flash Player (which is bundled with AIR). Unfortunately I don't think there's any way to use the ActiveX object from HTML in AIR.
Did you (or someone you know) create the ActiveX object? The only suggestion I can think of is to create a native extension (ANE) that performs the functionality of the ActiveX object, and use that ANE from your AIR app. (In fact, if you don't have access to the source of the ActiveX object you could probably create an ANE that uses the ActiveX object -- at least, long ago I wrote C# code that embedded the Flash Player ActiveX object so I'm guessing you could write a C# ANE that uses your ActiveX object.)
Adobe Developer Relations
thank you very much , Paul .
so, I will give up use ActiveX in HtmlLoader object.
I will try to this way:
call a php url in AIR------------------->use ActiveX in php page-------------------------->return a XML data to AIR
I think that maybe work.