
Tags
ActionScript
Adobe
AIR
AIR Native Extension
Android
ANE
Application Devlopment
Arduino
BlazeDS
C
CFUG
Class
ColdFusion
ColdFusion Builder
CompSci
Computer Engineer
Computer Science
CS
CSE
DLL
Education
Flash
Flash Builder
Flex
Flex Builder
InsideRIA
iPhone
Java
Job
K-12
Kinect
LiveCycle
LiveCycle DS
MacOS
MAX
Mobile
O’Reilly
POV
Queensland
Resume
RIA
RIM
TV
University
Video
Microblog
- 4:51:40 PM AIR applications created: x.apk, x.ipa 4:54:38 PM 91 changes committed: Subversion: Committed revision 17. 7 hours ago
- ok. code committed. now I have the rest of the day to do chores and play :) 7 hours ago
- Have I ever mentioned how much I despise Flex Skinning? Trying to update a Flex Mobile app to match the new Android UI/Style guidelines 7 hours ago
- bike bike bike bike. ANDERSON! 1 day ago
- finally registered for the @ahecta 2012 :) San Antonio, here I come (in a month) 2 days ago
- Waiting for the Michigan ActionScript Usergroup to begin... Mobile App Development Q&A tonight! 3 days ago
Archives
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- August 2011
- July 2011
- May 2011
- January 2011
- December 2010
- November 2010
- October 2010
- July 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- July 2009
- June 2009
- May 2009
- March 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- August 2007
- October 2006
- January 1970




Finally, thank for the detailed tutorials!
There are quite a lot of steps to build a simple DLL, I would expected Adobe to make ANE more simple.
Great job!
Pingback: Cool Stuff with the Flash Platform – 12/16/2011 | Android Developers
Great stuff – thank you Nick. Your style of teaching is refreshing!
I must have missed a step, but how did you make it so you could call your DLL functions from withing Flash Builder 4.6.0 without getting the “The extension context does not have a method with the name xxx”?
I’m assuming you are on a Mac? Check out http://quetwo.com/2011/12/03/working-with-air-native-extensions-on-the-mac/ (the last half) for a quick run-down how to fix it. It’s a pain in the rear, but we are hoping it is fixed in the next version of Flash Builder.
Actually, I’m on Windows 7.
I was aware of the mac issue so only did commandlines for now. But I’m getting the same problem on Windows somehow, Using 4.6.0. It works in a release though.
Thanks a lot for sharing.
I’ve been able to debug the extension doing this :
- package the ane using the debug dll.
- create a c/c++ attach to application debug configuration. Use the dll project, and point to adl.exe you’re using to debug the AIR application (should be C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\bin\adl.exe).
- First launch the air application in debug.
- Then debug the “c/++ attach to application” configuration. It should show you a process list with one adl.exe.
- Adl.exe will be suspended. Click on the process in debug view and choose resume.
- Now you can add breakpoint in your c/c++ code.
Hope this helps.
Awesome! Thanks!
Thanks for the tutorial. But how do I create an ane using more than one dll? How do I do if the dlls are communication and depends on the other?
You don’t really do anything special. Only one DLL can be your entry point, but if it depends on other libraries, then that is fine. Package both DLLs into the ANE into the META-INF\ANE\Windows-x86\ directory.
The Arduino ANE I created includes two DLLS (the main dll, and pthreads).
This is awesome series of presentations about ANE. I’ve found it very educating and well made with lot of details which I’d personally spend tons of time to go over… So, thank you Nick!
Few points I’d like to mention:
1. Developing with MinGW has it’s own +/-. For the drawbacks I’d mention difficulty using standard Windows API. I’ve found this when tried using WMI classes and calls in C++ and MinGW obviously doesn’t support any of this, so…
2. I’d suggest for the Author to mention there is a “CDT Visual C++ Support” plugin for Eclipse which integrates Visual Studio (Express) into the CDT. It installs support for VS includes and Microsoft SDK (if it’s presented).
3. I found that developing an extension with C++ actually requires declaring your functions in extension’s Application.h header file. I think this is not the case if you use C. But with C++ I wasn’t able to call my functions if they are not declared in the header file.
Keep it up Nick!
Dmitry.
Thanks. I’ve been contemplating putting up a more comprehensive ANE training course about all these. You are right — if you need to use anything Windows GDI, WMI, .NET, etc. using MiniGW is a real pain in the rear. There is quite a bit of documentation from Adobe (including two recordings on Adobe TV) on how to build ANEs with Visual Studio. I always though it was crazy that they supposedly required VS in order to make them, which is where this video series came from. I just couldn’t afford VS, nor did I really want it on my machine here at home (I use it at work for some projects and really do like it — it just makes my machine noticeably slow).
Btw. I did too got: “The extension context does not have a method with the name xxx” message. But since I was using C++ for my example, I though this maybe has something to do with C/C++ specifics. However ones I added declarations for the functions into header file, i was able to call the functions just fine:
extern “C” __declspec(dllexport) void initializer(void** extData, FREContextInitializer* ctxInitializer, FREContextFinalizer* ctxFinalizer);
extern “C” __declspec(dllexport) void finalizer(void* extData);
extern “C” __declspec(dllexport) FREObject isSupported(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[]);
extern “C” __declspec(dllexport) FREObject getTextString(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[]);
Yeah, if you use C++, the namespace dictionary gets mangled unless you do the extern “C” in front of those functions. Unfortunately, it is not the same issue that people have been running across where the DLL fails to load and they get “method connect() not found” or something along those lines… That is an issue with Flash Builder, and the way it is passing the command-line strings to ADL.