0

I would like to use a native extension (ANE) in Flash CS5.5. I saved the ANE as a SWC and added it to my project, but this error keeps on coming up:

Error message:

1172: Definition qnx.events:InvokeEvent could not be found.

ActionScript:

import qnx.events.InvokeEvent;

 import qnx.invoke.*;    

            //NOTE: THIS MUST BE THE FIRST THING SET IN YOUR APPLICATION CONSTRUCTOR

          InvokeManager.invokeManager.addEventListener(InvokeEvent.INVOKE, onInvoke );





         function onInvoke( event:InvokeEvent ):void

        {

            if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.INVOKE )

            {

                //invoked as an application/target.

                var mydata:InvokeRequest = InvokeManager.invokeManager.startupRequest;



           }

            else if( InvokeManager.invokeManager.startupMode == InvokeStartupMode.VIEWER )

            {

                //invoked as a viewer

                var myotherdata:InvokeViewerRequest = InvokeManager.invokeManager.startupViewerRequest;



           }

            else

            {



              //launched by the pressing on the icon on the home screen.

            }

        } 

Is there anything missing in the code? I never used an ANE/SWC before, so any help is welcome.

I uploaded the files. Would be great if someone could take a look at them: Download: http://www.sendspace.com/file/gjqp1w

Thanks.

Anky
  • 127
  • 2
  • 11

1 Answers1

0

How are you packaging the application? This error generally means the extension is not being packaged correctly with the application.

I believe from CS5.5 you still have to use the adt command line to specify the location of the ANE file when packaging, so if you're just exporting from CS5.5 you'll get this error.

Something like the following:

adt -package 
    -target ipa-ad-hoc 
    -storetype pkcs12 -keystore ../AppleDistribution.p12 
    -provisioning-profile AppleDistribution.mobileprofile 
    myApp.ipa 
    myApp-app.xml 
    myApp.swf icons Default.png 
    -extdir extensionsDir

Additionally you have to make sure you add the extensions id to you application descriptor:

<extensions> 
    <extensionID>com.extension.id</extensionID> 
</extensions>
Michael
  • 3,776
  • 1
  • 16
  • 27