Tinggo
Tinggo

Reputation: 1137

If Adobe Air ANE affect or conflict with Adobe Air

Because Adobe Air ANE enable developer to write native codes to control almost everything. So I wonder if it is possible ANE codes influence or conflict with Adobe Air native functions. For example, I turn the volume by actionscript3. meanwhile, I also adjust volume by ANE. Is it possible causes error or conflicts?

Upvotes: 0

Views: 198

Answers (2)

Josh
Josh

Reputation: 8149

AS3 is single threaded and completely linear. Two things cannot happen at the same time, even with an ANE (unless you use the ANE to leverage a second thread, obviously). Basically, with an ANE, you call a method from a SWC/AS3 library that calls a method in native code. The native code runs and then comes back to the SWC/AS3 library and then back to the originating code.

So...

as3 -> start changeVolume()
as3 library -> start changeVolume()
native code -> changeVolume()
as3 library -> finish changeVolume()
as3 -> finish changeVolum()
as3 -> next set of instructions run

EDIT: I should mention that this is not entirely true anymore. You can use workers that will allow you to utilize other threads. However, the most likely case for an ANE is on mobile and the workers do not currently work for mobile devices.

Upvotes: 2

Tim
Tim

Reputation: 2161

As I know, ANE just works like an library in AS3 code. It works like a linked SWC. So you just treat ANE as a SWC as a part of AS3 library code and wouldn't worry conflicts.

Upvotes: 0

Related Questions