Putting the Community in community help
Check out all the great new links we’ve added to community help: http://tmblr.co/Z8MtrwBUsOmL
Check out all the great new links we’ve added to community help: http://tmblr.co/Z8MtrwBUsOmL
Optimizing Performance for the Adobe Flash Platform contains a treasure trove of tips on less obvious performance enhancements. For example, chapter 3, “Minimizing CPU usage”, highlights the following CPU management features:
hasPriority HTML parameter. By default, Flash Player doesn’t start SWF content that is not visible. You can override this behavior in most cases by using the hasPriority parameter.REMOVED_FROM_STAGE and ADDED_TO_STAGE events to keep objects that are no longer in the display list from consuming unnecessary CPU cycles.ENTER_FRAME events: To execute code at specific intervals you can choose between a timer or ENTER_FRAME events. The optimal choice for your situation depends on a number of factors, such as whether your application uses animation.Visit the Optimization Guide to find out more about these topics and many others, including memory management, efficient use of the ActionScript language, rendering, networking, and database access.
The Flash Player 11/AIR 3.0 (Serrano) release fulfills a long-standing developer request by introducing a native ActionScript JSON API. With this API, you can import and export objects using JSON encoding. Native JSON functionality correlates closely with the ECMA-262 (5.1 Edition) specification for JSON. Because of this, its syntax is somewhat different from the third-party as3corelib JSON library. You can find out more about these differences in community member Todd Anderson’s blog posting at the Infrared5 company blog.
The API itself consists of a top-level class named JSON. This class provides two methods: stringify() for encoding, and parse() for decoding JSON strings. The JSON feature also supports toJSON() member functions in any class. Visit the official documentation at these locations:
ActionScript 3.0 Reference
ActionScript 3.0 Developer’s Guide
With the announcement of AIR 3 and its new native extension feature, detailed documentation about using Native Extensions for Adobe AIR is available now at:
Developing native extensions for Adobe AIR
You’ll find:
- Overview and conceptual information
- How to use the C and Java native extension APIs, plus reference pages
- How to package your native extension using ADT
- Details on the Extension Descriptor file
- Information on using Android shared libraries, and using resources on Android and iOS
If you are using a native extension in your AIR application, see:
Using native extensions in AIR applications
For lots of examples and tutorials, see this Adobe Developer Connection page:
http://www.adobe.com/devnet/air/native-extensions-for-air.htm
Hey Everybody!
Flash Media Server 4.5 is out the door! Download the development version of the server and check out how cool it is to stream on-demand and live video to media players running in Flash/AIR and iOS devices.
After you download the development server, here are some tutorials to get you started:
For detailed information about HTTP streaming to Flash and iOS, see Configure HTTP Dynamic Streaming and HTTP Live Streaming.
Other new features in Flash Media Server 4.5:
Enjoy, and please let me know if you have any questions.
Jody
A community member pointed out recently that the ActionScript Language Reference description for Vector.sort() is incomplete. The reference will be updated soon. In the meantime, here’s the corrected description, which now includes sorting according to a “sort option” as well as sorting by using a compare function.
Vector sort() method:
Sorts the elements in the Vector object, and also returns a sorted Vector object. This method sorts according to the parameter sortBehavior, which is either a function that compares two values, or a set of sorting options.
The method takes one parameter. The parameter is one of the following:
function compare(x:T, y:T):Number {}
The logic of the function is that, given two elements x and y, the function returns one of the following three values:
- a negative number, if x should appear before y in the sorted sequence
- 0, if x equals y
- a positive number, if x should appear after y in the sorted sequence
- 1 or
Array.CASEINSENSITIVE
- 2 or
Array.DESCENDING
- 4 or
Array.UNIQUESORT
- 8 or
Array.RETURNINDEXEDARRAY
- 16 or
Array.NUMERIC
If the value is 0, the sort works in the following way:
- Sorting is case-sensitive (Z precedes a).
- Sorting is ascending (a precedes b).
- The array is modified to reflect the sort order; multiple elements that have identical sort fields are placed consecutively in the sorted array in no particular order.
- All elements, regardless of data type, are sorted as if they were strings, so 100 precedes 99, because “1″ is a lower string value than “9″.
Parameters
sortBehavior:* — A Function or a Number value that determines the behavior of the sort. A Function parameter specifies a comparison method. A Number value specifies the sorting options.
Returns
Vector — A Vector object, with elements in the new order.
Updates are now available to Developing AIR applications for television devices in Building Adobe AIR Applications on Adobe.com.
These updates include:
The prerelease ActionScript 3.0 Reference for Flash Player 10.3 (“Wasabi”) Beta is now available. You can find this documentation here.
The Wasabi project represents the convergence of Flash Player and AIR streams into a single quarterly update.
Highlights include the following new features and classes:
Acoustic echo cancellation (Flash Player)
Exclude unwanted echo artifacts from microphone audio captures.
Media measurement (Flash Player)
Implement media usage analysis on the Flash Player platform rather than as a player plugin. Collect stats independently of the video player being used.
HTMLLoader updates (AIR)
The HTMLLoader class now dispatches locationChanging and locationChange events with a LocationChangeEvent object as the payload.
Important! To see the beta classes, remember to set your Runtimes filter to include Flash Player 10.3 and earlier.
Please use the Comments area at the bottom of each page to give us feedback on this beta documentation.
Does your Flash Player application feature a video player? And if so, are you looking for a way to improve the video performance?
For several releases, Flash Player has supported GPU hardware acceleration for decoding H.264 videos. However, the rest of the rendering process still required the CPU. Flash Player 10.2 brings hardware acceleration support full circle by introducing the StageVideo API. Stage video lets you apply hardware acceleration to the entire video decoding and rendering process, thus freeing up CPU and memory resources.
A StageVideo API has previously been available only to AIR 2.5 for TV application developers, and through the Flash 10.1 Beta for Google TV. The StageVideo API in Flash Player 10.2 expands on these existing classes. It adds events for handling behavior in a browser context.
To learn how your application can take advantage of this new feature, see the following documentation:
Flash Media Enterprise Server 4 is now available on Amazon Web Services:
Use Flash Media Server on Amazon Web Services to create social media games, multicast live events, and deliver streaming video like the pros (think Hulu and mlb.com) for pennies on the hour with no fear of success–when your business takes off, you can stand on the shoulders of Amazon as your grow. You’ll never have to buy or maintain any hardware or software. Ahhhh. Sounds relaxing, right? You pay only the Amazon Web Services $5 monthly charge and pennies an hour for bandwidth and machine time. For more information about pricing and benefits, see the FMS on AWS product page at adobe.com.
The FMS on AWS documentation walks you through setting up an Amazon Web Services account, ordering and launching Flash Media Server, and verifying that the server is running. It also includes the following tutorials:
And yes, you can build P2P apps with FMS on AWS. Start with the Multicast streaming tutorial, then check out Tom Krcha’s P2P game-building tutorials at flashrealtime.com.
Enjoy!