Windows ANE tutorial: Debugging the ANE

This is the final and probably most important part of the making of any native extension. You need to be able to step through both your ActionScript, as well as native code, in this case C++. See how to do that below. At the end of this part you will have: Ran and stepped through the native code of your ANE in Visual C++. And you will have completed this tutorial. Time 15-20 minutes Share on: WhatsApp Read More

Categories: AIR Native Extensions and Tutorials.

Calling native functions from ActionScript

So you have started writing an AIR Native Extension (ANE). You've got a pretty good idea of how AIR loads and unloads it from memory and know that you need an Extension Context to tell AIR about what functionality your native code exposes. The infographic in this article will show you the mechanism of making native function calls from ActionScript. Read More

Categories: AIR Native Extensions.

FREContextInitializer and FREContextFinalizer in C

So you already know that, in order to make calls from your AIR app into native code, you need an Extension Context. One of the Extension Context roles is to tell AIR what native functionality is available for calling from ActionScript and this happens during the Extension Context initialization. This post will show you how this is done in C - you can use that in your C, C++ or Objective-C code. Read More

Categories: AIR Native Extensions.

Native Extension Context Initializer and Finalizer

Do you remember the first call AIR makes when your AIR Native Extension is loaded in memory?

It's not a test. I'll even let you have a sneak peek, in case you've forgotten: when your ANE is first loaded, AIR calls its Extension Initializer: have a peek at what it looks like in C and in Java. Shortly after that the Extension Context is created. Read More

Categories: AIR Native Extensions.

How to send events from Java to ActionScript

When we looked at how native code and ActionScript communicate in a native extension, we saw that native code is mostly called and talked to and has a limited number of ways to respond or send data back. These are:

  1. Returning a FREResult object from a call to FREFunction.
  2. Using output parameters in a FREFunction.
  3. Sending an event to ActionScript.

In this article we are focusing on number 3: how events are sent from Java to ActionScript. Read More

Categories: AIR Native Extensions.

Extension Initializer and Finalizer in C

The Extension Initializer and Finalizer are the entry and exit points to your native extension. They are also two of the ingredients that make your extension known to the world and make it distinguishable from other extensions in an app. This is why they need to have unique names. Their signatures however need to be exactly as prescribed by AIR. Today we look at what these are in the AIR C API.

Read More

Categories: AIR Native Extensions.

Do you need a copy of FlashRuntimeExtensions.h in your project?

If you've ended up on this page, you are probably already familiar with what goes into an ANE for iOS and an ANE for Mac OS. You also know that one of the main ingredients for these is the AIR SDK and its interface for these two platforms: the AIR C API.

Now, when you try to include that in your iOS or Mac OS native library, Xcode helpfully asks you whether you want the API's header file, FlashRuntimeExtensions.h, copied into your project. What should you do?

04 xcode project Read More

Categories: AIR Native Extensions.