Starling example hints
Problems building and debugging the Starling example on Adobe Developer Connection? This blog posting might help.
Problems building and debugging the Starling example on Adobe Developer Connection? This blog posting might help.
Here’s a little tidbit about developing native extensions for Adobe AIR for Android devices using the native extension Java API.
The main point: The call that your extension’s ActionScript side makes to ExtensionContext.createExtensionContext() must return before the native side of the extension can call methods of the instance of your class that extends the FREContext class.
Let’s break that down.
The AIR runtime instantiates your FREExtension instance the first time the ActionScript side of your extension calls ExtensionContext.createExtensionContext().
The sequence of calls to your Java implementation of the FREExtension class is:
In createContext(), you return an instance of your class that extends the FREContext class.
But be careful. The FREContext object can only be considered fully constructed once the ExtensionContext.createExtensionContext() ActionScript method has returned.
Therefore, do not call any methods of your FREContext instance until after the ExtensionContext.createExtensionContext() ActionScript method has returned.
For example, you might be tempted to call your FREContext instance’s getActivity() method in its constructor. Don’t do it. You’ll get an IllegalStateException if you do.
Instead:
ExtensionContext.createExtensionContext() returns.getActivity() method.The Gyroscope and Vibration examples do exactly that. See them at http://www.adobe.com/devnet/air/native-extensions-for-air.html.
Detailed documentation about creating extensions is at Developing native extensions for Adobe AIR.
To use a native extension in your AIR application, see Using native extensions in AIR applications.
Sean Fujiwara recently posted a native extension for Adobe AIR at AIR 3 Native Extension Example – PenTablet.
This extension lets an AIR application get the pressure sensitivity data from a Wacom Intuos 4 pen tablet on Windows 7. It’s a good example of a Windows native extension that handles Windows messages and uses a native library — in this case, the pen tablet’s library.
Sean also provided another native extension for Windows that encodes a bitmap into BMP, JPEG, or PNG format using Microsoft .NET Framework 4. See AIR 3 Native Extension Example – ImageProcessor.
You can see more examples and tutorials of native extensions at the Adobe Developer Connection page http://www.adobe.com/devnet/air/native-extensions-for-air.html
Detailed documentation about creating extensions is at Developing native extensions for Adobe AIR.
To use a native extension in your AIR application, see Using native extensions in AIR applications.
Over the past year we’ve been out in the community listening to issues and gathering content. The results of our labors have been links and code samples added to our help pages. While we feel this makes our content more dynamic, it doesn’t do much unless you know it there. So, in an effort to get more eyes on all this great community content, we’re spicing up our pages in a couple of ways:
The August edition of the Adobe Edge newsletter features a great article by ace Flash/Flex/ColdFusion developer Brian Rinaldi. It’s called Getting Started with Adobe AIR for Android. Here’s a quick excerpt from the piece that describes what it covers:
“In this article, I discuss the essential tools you need to start developing for AIR for Android using Adobe Flash Professional CS5. I walk you through getting AIR installed on your Android phone and configuring Flash software to develop for that platform. Then I show you how to build and deploy your first application.”
While we’re on the topic of Brian, the Flash Platform content and community team are very pleased to announce that Brian joined our team as Web Community Manager as of August 16. Brian will be working with Adobe to define and drive our community strategy and develop programs to promote community help.
Many of you may know Brian as an author, presenter and thought-leader within the Adobe developer community. He has more than 11 years of experience developing web applications in both small businesses and large enterprises including 10+ years with ColdFusion and SQL (he is an Adobe Certified Expert in ColdFusion) and 3+ years with Flex/AIR/ActionScript.
Brian has been an active organizer and volunteer for several years. He started his own conference in Boston – known first as Flex Camp Boston, now as RIA Unleashed. In addition to running the Boston ColdFusion User Group for the past five years, Brian was an Adobe Community Professional as well as an advisor to the Boston Flex User Group.
Brian blogs regularly at remotesynthesis.com and is an unapologetic Twitter addict under the handle @remotesynth. Check him out!
Until now, there have been two fundamental ways to deliver video to Flash Player/AIR:
Now there’s a third way to deliver content to Flash Player 10.1 and AIR 2:
To stream on-demand (recorded, not live) content over HTTP, you can use any installation of Apache 2.2, including the version that installs with Flash Media Server 3.5. Using Adobe HTTP Dynamic Streaming has an end-to-end tutorial that steps you through configuring Apache, packaging content for delivery, and playing the content in the OSMF Player.
Using Adobe HTTP Dynamic Streaming also contains a live tutorial, and detailed information about how this new solution works. To stream live content over HTTP, you need Flash Media Server 3.8.
For more information about the HTTP Dynamic Streaming ecosystem, see Kevin Towes’ blog and www.adobe.com/products/httpdynamicstreaming.
Flash Player 10.1 and Flash Media Server 3.5.3 support two exciting new buffer management features: Stream Reconnect and Smart Seek. To see them in action, check out this example: Stream Reconnect and Smart Seek example. Right-click on the example and choose View Source to see the code.
The example is also linked from the Flash Media Server 3.5.3 New Features Guide. This doc has all information you need about how to use the Smart Reconnect and Smart Seek ActionScript APIs.
Here’s a quick, high-level view:
Stream Reconnect
With the release of Flash Player 10.1, you can deliver video players that continue to play media seamlessly when a connection is dropped or when a client switches from a wired to a wireless network connection. Adobe Product Manager Kevin Towes says:
We’ve essentially decoupled the buffer from the connection – which allows video to play back even if the connection drops. Developers can use ActionScript to reconnect to FMS and resume playback – and if this is done before the buffer empties, then there will be no perceived disruption.
Smart Seek
Flash Media Server 3.5.3 and Flash Player 10.1 work together to support smart seeking in VOD streams and in live streams that have a buffer. Smart seeking uses back and forward buffers to seek without requesting data from the server. You can step forward and backward a specified number of frames. (Standard seeking flushes buffered data and asks the server to send new data based on the seek time.) Smart seeking reduces server load and improves seeking performance. Use smart seeking to create:
•Client-side DVR functionality. Seek a live stream within the client-side buffer instead of going to the server for delivery of new video.
•Trick modes. Create players that step through frames, fast-forward, fast-rewind, and advance in slow-motion.