Feathers 3.0: A New Major Version

Congratulations to Josh Tynjala and the Feathers open source project for the release of Feathers 3.0. Feathers offers a large collection of ActionScript user interface components and layouts for mobile and desktop. It is powered by both Starling Framework and Adobe AIR.

feathers-3-dot-0-final

What’s new in this release?

Many of the changes in Feathers 3.0 can be found under the hood, including bug fixes and architecture improvements. This version lays a foundation for new components and features in future versions.

Improved Performance When Idle

Feathers apps benefit greatly from the architecture changes in Starling Framework 2.0. CPU usage in static scenes has dropped to nearly zero with Starling’s new skipUnchangedFrames property. This means that apps built with Feathers should use less battery, which makes them better citizens on mobile devices.

Just take a look at this comparison made by Adobe Scout that shows an idle Feathers 2.3 app compared with the same app running on Feathers 3.0:

feathers-idle-performance

Skinning

In Feathers 3.0, the developer experience gets better too. Let’s look at some of the skinning improvements.

The Scale9Image, Scale3Image, and TiledImage classes are no longer necessary in Feathers 3.0 because Starling 2.0 now supports these capabilities natively in the Image class using the scale9Grid and tileGrid properties.

Here’s an example of using the scale9Grid property with an Image:

var image:Image = new Image( texture );
image.scale9Grid = new Rectangle( 3, 2, 6, 3 );
image.width = 100;
addChild( image );

For components that have more than one state (such as a Button that can be up, down or disabled), Feathers includes a new ImageSkin class that accepts multiple textures.

ImageSkin works a lot like Starling’s Image class, but it adds a new setTextureForState() method that can be used to pass in additional textures. Take a look at this example of using ImageSkin to skin a Button component’s states:

var skin:ImageSkin = new ImageSkin( upTexture );
skin.setTextureForState( ButtonState.DOWN, downTexture );
skin.setTextureForState( ButtonState.DISABLED, disabledTexture );
skin.scale9Grid = new Rectangle( 3, 2, 6, 3 );
button.defaultSkin = skin;

Migrating from Feathers 2.x to 3.0

Feathers 3.0 includes many more improvements, and some of them may require changes to your existing Feathers apps. Please read through the Feathers 3.0 Migration Guide for complete details about upgrading to this new major version.

feathers-migration-guide

You may also want to review the Starling 2 Migration Guide because it provides specific hints about upgrading Starling.

Get started with Feathers 3.0.0

You can find the Feathers UI 3.0.0 release notes on the project’s Github page. Developers are encouraged to download the latest stable version from the Feathers website.

How to provide video rotation information to ActionScript as metadata

fp_air

By Jason Lee

Prior to Flash Player and AIR version 20, the Flash runtime does not correctly process the matrix field values in the Track Header Box and the Movie Header Box, as defined in the ISO specification ISO/IEC 14496-12:2008. As a result, in some instances, the user experiences an incorrectly resized and rotated video when the video is played back with Flash. The problem is particularly pronounced when playing videos that are recorded in portrait mode with old Android or iOS devices. This happens because these devices save video in landscape mode along with a matrix representing rotation transformation, when the users record the video in portrait mode.

Flash Player and AIR version 20 introduce a feature whereby video rotation meta-data is provided through ActionScript. This feature mitigates the problem discussed above by providing the video matrix information to ActionScript as a part of the meta-data object of the onMetaData event, an event handler of the NetStream object. This allows the ActionScript developers to render the video in the intended rotation matrix. It should be noted that the Flash Player engine does not automatically apply the video matrix information to the rendered video output, so as to avoid any resizing or rotation that is not intended by the ActionScript developer.

video-rotation-problem

The ActionScript code example below shows how to apply the rotation matrix to the Video object.

Note: The example assumes that the video is recorded along a matrix representing 90° clockwise rotation.

var video:Video = new Video();
 addChild(video);
 var nc:NetConnection = new NetConnection();
 nc.connect(null);
 var ns:NetStream = new NetStream(nc);
 ns.client = {};
 ns.client.onMetaData = ns_onMetaData;
 ns.client.onCuePoint = ns_onCuePoint;
 video.attachNetStream(ns);
 ns.play("Demo.mp4");
 
function ns_onMetaData(info:Object):void {
 trace("metaData");
 video.x = 0,
 video.y = 0;
 video.width = info.width;
 video.height = info.height;
 varmatrix:Matrix = video.transform.matrix; // Read old transform matrix of video object.
 varoldSize:Point = new Point(video.width, video.height);
 varnewSize:Point = new Point(Math.abs(info.matrix.transformPoint(oldSize).x), Math.abs(info.matrix.transformPoint(oldSize).y));
 matrix.translate(-(oldSize.x / 2), -(oldSize.y / 2));
 if (info.hasOwnProperty("trackHeaderBoxMatrix"))
 matrix.concat(info.trackHeaderBoxMatrix[0]); // Apply the matrix of the Track Header Box of Video Track provided by this feature to video object.
 // trackHeaderBoxMatrix is an array of MatrixObject because there can be one or more video tracks.
 if (info.hasOwnProperty("movieHeaderBoxMatrix"))
 matrix.concat(info.movieHeaderBoxMatrix); // Apply the matrix of the Movie Header Box provided by this feature to video object.
 matrix.translate((newSize.x / 2), (newSize.y / 2));
 video.transform.matrix = matrix; // Set new matrix to transform matrix of Video object.
 }
 function ns_onCuePoint(item:Object):void {
 trace("cuePoint");
 }

The feature works for NetStream objects using progressive download, which allows Flash runtime to download and directly parse a video file. However, this feature does not handle NetStream using RTMP or appendBytes, in which case, the matrix properties provided by this feature are not available. This feature provides the matrices for all file formats — MP4, M4V, F4V, and 3GPP in accordance with ISO specification ISO/IEC 14496-12:2008, when using progressive download. For all other file formats, such as FLV, the matrix properties provided by this feature are not available.

The matrix information provided by this feature can only be applied to an instance of the Video class. Therefore, with StageVideo, which uses GPU acceleration, for example, the matrix information is not applicable.

This feature introduces the following new properties of the object representing video meta-data, a parameter of onMetaData event handler:

  • Object.movieHeaderBoxMatrix: flash.geom.Matrix
  • Object.trackHeaderBoxMatrix: An array of flash.geom.MatrixtrackHeaderBoxMatrix is an array of MatrixObject because there can be one or more video tracks in a single video file.

If you are a Flash content developer and are having trouble getting a video to display in correct orientation, please try this new ActionScript functionality for handling video rotation meta-data.

TestFairy – A mobile beta testing platform

Have you been looking for ways to improve your mobile testing?  I’ve recently seen a demonstration from the folks at TestFairy and was blown away at the level of integration and functionality that they’ve made available to developers.  If you’re looking to improve the quality of the bug reports that you receive from your testers and you want easy integration into your AIR application, definitely check out TestFairy to see what they have to offer.  There are both free and paid plans available.

Check out the video below to see how easy it is to use and implement in your application!  The TestFairy ANE can be downloaded here.

Issues while downgrading from AIR 20 to a lower version on Mac OS X

air_3_icon_rgb

By Eric Simenel

This tech note addresses the problems that you may face when attempting to downgrade from AIR version 20 to an older AIR version. Prior to AIR version 20, AIR was provided as a 32-bit Runtime dynamic Library for Mac OS X. However, with the release of AIR 20, only a 64-bit Runtime dynamic Library is provided on Mac OS X. See AIR 20 release notes for details.

Certain users who are running apps that require 32-bit ANEs may want to downgrade to a lower AIR version that supports a 32-bit Runtime dynamic Library. Prior to AIR 20, downgrading AIR to a previous version (let’s say AIR 19) is a simple process:

  1. Download AIR 19 runtime. For downloading any other versions, see Archived Adobe AIR SDK versions.
  2. Uninstall AIR 20 runtime. See Removing Adobe AIR for details.
  3. Install AIR 19 runtime. See Installing Adobe AIR for details.
  4. Run AIR Settings manager utility to disable further updates of the runtime.

However, these steps will not suffice when you are downgrading from AIR 20 to a previous AIR version as there are some additional steps required in this case. To meet this requirement, the additional steps or the solutions are explained below.

Downgrading from AIR 20

Starting with AIR 20, which is a now 64-bit Runtime (instead of the previous 32 bit AIR runtime), the process for downgrading is the same as mentioned above. But there are certain points, which require attention when attempting to downgrade.

After you install AIR 20, any previously installed AIR app using the Shared Runtime that is launched gets updated. So the app’s launcher code will now be a 64-bit binary. The previously used 32-bit launcher gets renamed with a ‘_32’ suffix.

Note: AIR Captive Runtime Apps are unaffected by this upgrade to AIR 20. See AIR 64-bit on Mac OS X for more details.

Issue

If you go back to a previous AIR version, for example, AIR 19, then after uninstalling AIR 20 and installing AIR 19, an attempt to launch the updated AIR app fails because the new 64-bit launcher is unable to find the 64-bit AIR Runtime.

This problem occurs only when attempting to downgrade to an older version.

Solution

You can use either of the three solutions to resolve this issue:

Solution 1: Move the application to the Trash, empty the Trash, and reinstall it from its .air package or custom installer as you did when you installed it the first time.

Solution 2: Rename the launchers at <AIR application>/Contents/MacOS/.

  1. For the launcher with no suffix, add a ‘_64’ suffix.
  2. For the launcher with the ‘_32’ suffix, remove this suffix.

Note: Here launcher refers to the name of your <AIR application>.

Solution 3: Edit the contents of the info.plist file so that its CFBundleExecutable key has the ‘_32’ suffix. The info.plist file is present at <AIR application>/Contents/.

Downgrading after an initial AIR 20 installation from a SideCar

There is another issue that a few users may face — specifically, those who install an AIR application with a SideCar AIR 20 installation; having never before installed an AIR shared runtime and then downgrading from AIR 20.

Note: An AIR SideCar Installation is one where an .air package is distributed alongside the AIR installer so that both AIR and this application are installed at the same time.

After an Initial AIR 20 installation from a SideCar, launching the .air package results in Mac OS X “blessing” the Adobe AIR Installer that sits next to it. Hence forward, Mac OS X remembers this application as the default launcher for an .air package. If you do not delete this directory after installing, then anytime you launch an .air package, this Adobe AIR Installer is launched. Checking that the AIR Runtime is now present, it goes on with the standard AIR App installation that is done by the AIR Runtime.

Issue

Now when you uninstall AIR 20, install AIR 19, and then try to launch an .air package, this attempt fails because the Adobe AIR Installer that is a 64-bit binary is unable to load the AIR Runtime that is now a 32-bit binary again. That Adobe AIR Installer (version 20) keeps its precedence over the Adobe AIR Application Installer (version 19) that is present at /Applications/Utilities because the Adobe AIR Application Installer has not been launched yet and is “invisible” to Mac OS X.

Solution

The solution to this issue is to simply delete the directory that contains the SideCar .air package and Adobe AIR Installer so that this 64-bit binary longer exists. Thus, it will not be launched by Mac OS X when .air launches. Instead, the 32-bit Adobe AIR Application Installer will be launched.

References

Feathers UI 2.3.0 Update

Congratulations to Josh Tynjala and the Feathers open source project for the release of Feathers UI 2.3.0!  Feathers offers a large collection of ActionScript user interface components and layouts for mobile and desktop.  Feathers is powered by both the Starling Framework and Adobe AIR.

feathers date time spinner

What’s new in this release?

In version 2.3.0, Feathers UI includes a new DateTimeSpinner component and a number of powerful new features that have long been requested by the community.

The DateTimeSpinner component is a mobile-style date and time picker built with a series of SpinnerList components.

List and GroupedList now support the ability to display more than one type of item renderer in the same list. It’s now easy to style the first or last item renderer differently or to choose the type of item renderer based on the values of an item’s properties.

TextureCache makes it possible to reuse textures loaded from URLs, instead of potentially recreating them multiple times. It’s perfect for lists that need to display many images. TextureCache can save bandwidth, but watch out because it can require more memory.

TapToTrigger, TapToSelect, and LongPress make it easy to add simple gestures to custom components, such as item renderers.

Text renderers now support the ability to automatically change font styles when their parent component changes to different states. For instance, a text renderer used by a Button component can now detect when the button is being pressed, and the color of the text will be updated. Unlike previous APIs like downLabelProperties and hoverLabelProperties, this new approach can be more strictly type-checked by the compiler, leading to fewer mistakes in your code. Additionally, this feature can be used by other components with states, such as a TextInput (which may be focused or disabled).

Finally, this version also includes a new TopcoatLightMobileTheme, which is based on a contribution by Marcel Piestansky.

Example

Let’s look at a quick example of using a TextureCache class with a List:

var cache:TextureCache = new TextureCache(30);
var list:List = new List();
list.itemRendererFactory = function():IListItemRenderer
{
    var itemRenderer:DefaultListItemRenderer = new DefaultListItemRenderer();
    itemRenderer.iconLoaderFactory = function():ImageLoader
    {
        var loader:ImageLoader = new ImageLoader();
        loader.textureCache = cache;
        return loader;
    };
    return itemRenderer;
};
addChild(list);

In the code above, every ImageLoader that appears in the List will share the same TextureCache. As the List scrolls, the newly loaded textures will be saved, but existing textures will be borrowed from the cache.

Get started with Feathers UI 2.3.0

You can find the Feathers UI 2.3.0 release notes on the project’s Github page. Developers are encouraged to download the latest stable version from the Feathers website.

AIR 64-bit on Mac OSX

By Nidhi Tanwar

air_3_icon_rgb

With the release of AIR 20, the feature AIR 64-bit implies a major change for the AIR desktop developers. In the previous AIR versions, a 32-bit Runtime Dynamic Library was provided for Mac and Windows. However, with the release of AIR 20, only a 64-bit Runtime Dynamic Library is provided on Mac OS X. This means that all the new applications created by AIR developers will run on the 64-bit Runtime on Mac OS X. All the existing shared applications, captive applications, and native applications will continue to work on the 64-bit Runtime on Mac OS X.

Changes for existing applications

The existing AIR applications require the following changes when using AIR 64-bit.

Shared, Captive, and Native applications

These applications will continue to run on AIR 64-bit.

Native extension

All the native applications that use a 32-bit ANE need to add a 64-bit ANE to continue working with AIR 20 and beyond on Mac OS X. To create a 64-bit ANE, you have to provide the platform value as MacOS-x86-64 in the extension descriptor file and in the command used to create the ANE.

So, a native extension descriptor file for Mac OSX will have the following structure:

<platforms>
  <platform name="MacOS-x86-64">
    <applicationDeployment>
      <nativeLibrary>…</nativeLibrary>
      <initializer>…</initializer>
      <finalizer>…</finalizer>
    </applicationDeployment>
  </platform>
</platforms>

And the command for creating the ANE will be:

adt -package  -target ane  path/where/you/want/YourANE.ane YourExtensionDescriptor.xml  -swc YourAIRLibrary.swc  -platform MacOS-x86-64  library.swf YourMacOSNativeLibrary.framework

Libraries and frameworks for Xcode

When you are creating the native code extension for 64-bit architecture using Xcode, the following libraries and frameworks have to be included in Xcode (see figure below):

  • Adobe AIR.framework
  • Adobe AIR_64

 

 

 

 

 

 

 

 

 

 

 

 

 

Note: If you do not add Adobe AIR_64, which is a 64-bit dylib inside the Adobe AIR framework, you may get link errors such as “ld: symbol(s) not found for architecture x86_64 error.”

Linking ANE using Flash Builder 4.7

If you are linking your AIR application with 64-bit ANE using Flash builder 4.7 by adding the ANE in ActionScript Build Path for the AIR project, you will notice that there is a red ‘X’ next to the ANE file entry in the Build Paths dialog box (see figure below). If you click the triangle, you will see the error “This ANE does not support air-native-macosx platform”. This is a quirk in Flash Builder 4.7; if you click the triangle next to Targets, you will see that MacOS-x86-64 is supported by the ANE.

Linking ANE using Flash Builder 4.7

 

The red ‘X’ issue is observed again when you are packaging the ANE by including the ANE in ActionScript Build Packaging.

Ignore the error and click OK.

3

 

When you are creating your native application from the Project >Export Release Build, Flash Builder displays a packaging error. To continue with app creation, check select Ignore Errors in Native Extensions tab and click Finish. Your application will be created successfully.

4

 

Related Documents

Flash Runtime v20 Release Announcement!

We’re pleased to announce the immediate availability of Flash Player and AIR version 20!  With this December release, we’ve added new features, important security updates and functional bug fixes for our customers.  Full details on this release can be found in our release notes and security bulletin.

Updates for Flash Player 20 have automatically started rolling out to those that have enabled “Allow Adobe to install updates (recommended)”.  If you’ve opted into this auto update mechanism there’s no work required on your end.   Over the next 24 hours we’ll be pushing this update out silently and automatically to computers connected to the internet.

Customers using Google Chrome or Windows 8.x/10 Internet Explorer or Microsoft Edge will receive the update through the Google and Microsoft update mechanisms.

Last week we made some exciting announcements around Flash Professional, now Adobe Animate CC, and a new partnership for the Flash Runtime.  The future is very bright for the Animate CC team and for the designers and developers that use this tool.  The changes and improvements they’ve made and have planned for 2016 are inspiring and we’re more than confident that they will continue to deliver the innovation that our customers need to succeed.

On the Flash Runtime side, we’re thrilled to announce our partnership with Facebook.  We know that our customers and developers rely on Flash content to work securely and reliably.  With this new partnership with Facebook, our ongoing collaboration with both Google and Microsoft, and our close work with Apple, Mozilla, Opera and others, we’re committed more than ever to making the Flash Runtime secure, reliable, and compatible for everyone.

As we close out 2015, Flash Player enjoys amazing ubiquity with full support from every major browser and operating system in use today.  Flash Player is built into every version of Google Chrome and ChromeOS.  Flash Player comes as part of both the Windows 8 and Windows 10 operating systems and works seamlessly with both Internet Explorer and Microsoft Edge.  Flash Player has full support from Mozilla Firefox, Apple Safari, and Opera.  This unprecedented level of support allows our developers to be successful and our customers to enjoy the content they want to use, view, and play.  We look forward to great things to come in 2016 and we wish everyone a happy new year!

 

Read past the break for the highlights of this release!

Continue reading…

November Flash Runtime Update

If you hadn’t noticed, we updated both Flash Player and AIR last Tuesday (11/10) with new builds focusing on security and important bug fixes.  Flash Player was updated to 19.0.0.245 and AIR is now at 19.0.0.241.  AIR developers, please note that the AIR SDK and runtime were updated with a refresh of the embedded Flash Player plugin only.

Full details can be found, as always, in our release notes and Flash Player and AIR forum announcements.

But that’s not all!  November was our last scheduled v19 release and we’re now on track for a December launch of v20!  Head on over to Adobe Labs to pick up the latest Flash Player and AIR betas.   Make sure to check out the new AIR beta features like Android TV support, secure socket for iOS, and 64-bit support for OSX (Windows coming soon).  On the Flash Player side we’ve got improved PPAPI printing and now Windows 8/10 access to hardware acceleration options.  Full details in the release notes.

Flash Player guidance for Internet Explorer 11 and Microsoft Edge

A great deal of flash content, which works in Internet Explorer 10 or earlier, may behave incorrectly with Microsoft’s latest browsers. This blog post will list technical differences to help developers debug why their site might be broken in Internet Explorer 11 or Microsoft Edge.  This is truly a deep dive into the workings of Flash Player and browser detection.

For those that merely want our recommended best practice to embed Flash Player in your HTML code, the answer is simply use SwfObject 2.3.  Documentation can be found in the README on GitHub and on the Google Code pages.  If you use SwfObject 2.3, you can have high confidence that your content will load appropriately with all modern browsers.

If you are interested in learning more, make sure to check out the remainder of the article after the break.

Huge thanks to Peter Grandmaison and Jeromie Clark for their encyclopedic knowledge and guidance putting this post together.

Continue reading…

Flash Player Security Update Available

We’ve updated Flash Player with important security updates today.  For everyone enrolled in our auto update system (highly recommended), you’ll be automatically and silently updated within 24 hours.  For more details on this release, please see our security bulletin and release notes linked below.

Security Bulletin (APSB15-27)

Flash Player release notes