Your SlideShare is downloading. ×
Beefing Up AIR - FITC AMS 2012
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Beefing Up AIR - FITC AMS 2012

10,038
views

Published on

Presentation given at FITC Amsterdam 2012. …

Presentation given at FITC Amsterdam 2012.

AIR has been the cross device platform to deploy interactive applications. This session shows you how you can extend the default capabilities and add native interaction and performance to your applications.

Published in: Technology, Education

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
10,038
On Slideshare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
24
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. BEEFING UP AIRNative extensions in AIR 3.0
  • 2. @WOUTER• Wouter Verweirder• blog.aboutme.be• Lecturer @ HOWEST• Partner @ Happy Banana• AS3NUI / AIRKinect
  • 3. SESSION OVERVIEW1. What is a native extension2. Build a native extension 1. Hello World 2. Working with AS Objects 3. Threading / Communication 4. What about Android3. Use a native extension4. AIRKinect extension5. Q & (hopefully) A
  • 4. WHAT IS A NATIVE EXTENSION?• Extend the features of the AIR runtime ! • For TV, Mobile, Desktop
  • 5. WHAT IS A NATIVE EXTENSION?
  • 6. WHAT IS A NATIVE EXTENSION? Flex ActionScript extension AIR AS3 AS3 ... DLL JAR OS
  • 7. ANE FILE STRUCTURE library.swf catalog.xml extension.xmllibrary.swf library.swf ...ext.dll ext.jar
  • 8. ANE FILE STRUCTUREREGULAR SWC FILE
  • 9. ANE FILE STRUCTUREANE FILE
  • 10. WHY?• access native platform specific code libraries• Re-use legacy native code• Increase performance (native performance / threading)
  • 11. WRITING AN EXTENSION• ActionScript: ExtensionContext class• Native: •C entry point on Windows, OSX, iOS (& Android) • Java entry point on Android
  • 12. WRITING AN EXTENSION adt ane file
  • 13. 1. Create ExtensionContext object2. Look up link with native code in XML
  • 14. 3. Link the context initializer4. Link the native functions in the context initializer
  • 15. 5. Call a method in native code
  • 16. extension initializer context initializerfunction calls & events context finalizer extension finalizer
  • 17. Demo Hello World
  • 18. WORKING WITH AS OBJECTS• Construct new AS3 Objects• Get AS3 Object Type• Get / Set properties of AS3 Objects• Call AS3 Object methods
  • 19. WORKING WITH AS OBJECTSSIMPLE DATA TYPES
  • 20. WORKING WITH AS OBJECTSAS CLASS INSTANCES
  • 21. WORKING WITH AS OBJECTSEXAMPLE:
  • 22. ARRAY / VECTOR METHODS
  • 23. BYTEARRAY / BITMAPDATA acquirememory access No other API methods are allowed here release
  • 24. BYTEARRAY / BITMAPDATA
  • 25. BYTEARRAY / BITMAPDATAEXAMPLE:
  • 26. Demo ByteArray Access
  • 27. THREADING• Is allowed in the native extension :-)• NO FRE API calls allowed outside the main thread• except for: FREDispatchStatusEventAsync
  • 28. THREADING
  • 29. Demo Threading
  • 30. WHAT ABOUT ANDROID ?• C API for Windows, OSX & iOS• Java Wrapper for Android: • com.adobe.fre.FREExtension create instance of... • com.adobe.fre.FREContext returns collection of... • com.adobe.fre.FREFunction
  • 31. WHAT ABOUT ANDROID ? EXAMPLE:
  • 32. WHAT ABOUT ANDROID ? EXAMPLE:
  • 33. WHAT ABOUT ANDROID ?EXAMPLE:
  • 34. Demo Mobile UDP extension
  • 35. PACKAGING AN ANE library.swf catalog.xml extension.xmllibrary.swf library.swf ...ext.dll ext.jar
  • 36. PACKAGING AN ANE1.Compile SWC of your AS3 code2.Unzip SWC file, get library.swf file3.Put swc, library.swf, extension.xml & native builds (dll, ...) in one directory4.Run adt command
  • 37. PACKAGING AN ANEadt -package -storetype pkcs12 -storepassp@ssw0rd -keystore key.p12 -tsa none -target ane HelloWorldExtension.aneextension.xml -swc helloworldas.swc -platform MacOS-x86 library.swfHelloWorld.framework -platform Windows-x86 library.swf HelloWorld.dll http://help.adobe.com/en_US/air/build/ WS789ea67d3e73a8b22388411123785d839c-8000.html
  • 38. BUILDING APPS WITH ANE’S
  • 39. BUILDING APPS WITH ANE’S
  • 40. BUILDING APPS WITH ANE’S
  • 41. AIRKINECT• Native extension to use the Kinect in your AIR apps• Current version: 1.7.1 • Full skeleton Data • Camera Streams: RGB & Depth • Point Cloud info
  • 42. Created By Tim Camerlinckx - http://vimeo.com/34614887
  • 43. Created By Yannick Van der Goten - http://vimeo.com/34563640
  • 44. Created By Laurents Laire - http://vimeo.com/34264122
  • 45. Created By Simon Pertz - http://vimeo.com/34681243
  • 46. AIRKINECT 2.0• Simplified API• New features: • Skeleton Joint Rotations • User center-of-mass • Point Cloud Regions • IR Camera Stream
  • 47. Time for some Kinect coding!
  • 48. Questions(and hopefully some answers...)
  • 49. Thank you! @wouter http://blog.aboutme.be http://www.as3nui.comhttp://www.happy-banana.be

×