views:

9

answers:

0

I am trying to launch my adobe AIR application from the browser. I have the following set:

application.xml

<allowBrowserInvocation>true</allowBrowserInvocation>

AIR App

<html>
    <head>
        <title>New Adobe AIR Project</title>
        <script type="text/javascript" src="lib/air/AIRAliases.js"></script>
            var globalinvoke;
            function appload()
            {
                air.NativeApplication.nativeApplication.addEventListener(air.InvokeEvent.INVOKE, onInvokeEvent);
                air.NativeApplication.nativeApplication.addEventListener(air.BrowserInvokeEvent.BROWSER_INVOKE, onBrowserInvokeEvent);
            }
            function onInvokeEvent(invocation)
            {
                alert("Invoke");
            }
            function onBrowserInvokeEvent(invocation)
            {
                alert("BrowserInvoke");
            }
            function displayids()
            {
                document.getElementById("pubiddiv").innerHTML = air.NativeApplication.nativeApplication.publisherID + "<br/>" + air.NativeApplication.nativeApplication.applicationID;
            }
        </script>
    </head>
    <body onLoad="appload();">
        Hi There!<br/><br/>
        <div id="pubiddiv"></div>
        <br/>
        <input type="button" onclick="displayids()" value="Show IDs"></input>
    </body>
</html>

From the browser, I am trying to follow the steps as in here, it says "Invoking Application" but nothing happens

I am using AIR 2.0