Question

With Flash Builder 4.7, I have a couple of native extensions that I'm including in my project. Problem is, when I debug on the desktop, I get those stupid popups explaining I can't run the native extensions. I would love to add some type of flag to ignore the native extension when debugging on desktop.

Right now the only way I can do this is to remove the native extensions before testing on desktop then re-adding them. Some of the ANE's I'm using don't use a SWC so I get a bunch of compiler errors.

Was it helpful?

Solution

If the ane package does not support the default platform, or the platform that you are running on then you are out of luck.

If you have the source code and are able to compile and package all of your own air native extensions, then you need to add the default platform which is an AS3 only implementation.

The article that Josh posted describes the adt command options to package a native extension including the default platform.

It is also advisable to follow Adobe's model for potential optional api's per platform and add a static get property of isSupported to your ANE interface. Then on the default platform you can return false, and handle the platform diferences in your code rather easily.

If you are using ANE's that you do not have the source code to, or unable or unwilling to recompile the ANE, or have some other reason why you can not implement a default platform in your ANE, then the next best thing to do would be to wrap any imports and statements that refer to code in the ANE with a conditional compilation flag. Full details on conditional compilation can be found here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top