Apache Flex 4.11+ and OSMF Quick-Tip

RuntimeErrorVideoDisplay

When using Apache Flex 4.11 (or 4.12) – and the Spark VideoDisplay component (based around OSMF)… you may encounter the following runtime error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.

This happens when attempting to reference the videoObject element of a VideoDisplay component. For example, when attaching a camera:
videoDisplay.videoObject.attachCamera(camera);

Why does this work correctly in 4.10 and breaks in never versions of Apache Flex? As explained in this bug report, it is because of the newer version of OMSF which is distributed with Apache Flex 4.11 and higher. This is a bug which Adobe needs to resolve, as they are still in charge of OSMF. Unfortunately, it appears that they do not actually care… which makes no sense – with “premium video” being one of the use cases for Flash Player which they tout in what little marketing they have around the runtimes.

Anyhow – enough complaining… how to fix it?

We will grab an older version of OSMF from Apache Flex 4.10 via Apache Flex® SDK Installer and simply copy osmf.swc into our Apache Flex 4.12 SDK. In fact, you probably already have 4.10 on your system if you are just noticing this issue.

Navigate to your Apache Flex 4.10 SDK installation (C:\sdks\4.10.0\ in my case) and copy frameworks\libs\omsf.swc.

modOSMF

Now, navigate to your Apache Flex 4.12 (or 4.11 or whatever) SDK installation (C:\sdks\4.12.0\ in my case) and rename frameworks\libs\omsf.swc to something like frameworks\libs\omsf.new. Now simply paste in the older swc you previously copied from the 4.10 sdk. If you now compile your project against the newer SDK – everything should work just fine!

worksOSMF

Note that this… isn’t a perfect solution. You’ll be using the older OSMF libraries within your project so keep that in mind.

Apache Flex 4.12.0

Apache Flex

With the release of Apache Flex 4.12.0, users can now get the SDK and related libraries through use of the excellent AIR-based installer. A few choices, a couple clicks, and you have the final bits.

So what’s new in this release of Flex? Here are the release notes and official Apache announcement.

Add SDK

Once you have the SDK, simply add it to Flash Builder or whatever IDE you use to write Flex applications. The installer makes this so simple.

Flash Platform Rundown – End of November, 2013

Updates to Flash Player 12 and AIR 4 betas
Adobe has updated the beta runtimes to include some really cool new features on top of the ones which have already been announced. These include an improved packager for iOS, ANE resource improvements in Android, textfield enhancements for desktop, and a new Context3D convenience array. More details on each of these features is included below. Flash is alive and well!
Flash Runtimes Update

iOS – Improved Packaging Engine
We’re very excited about this new feature. The new packaging engine we’re working on can improve iOS packaging time up to 10 times over the current packager! However this feature is still early in development and we’d like to get your feedback. To enable this feature, please use “-useLegacyAOT no” in the ADT command, before the signing options.

Android – Support for native resources access by R* mechanism in native extension
Currently, to use the native Android resources in the Android Native Extension one has to use getResourceID() API while typically to access the resource IDs developers use the R.* mechanism. AIR 4.0 onwards, apps developers will be able to access the resources by R.* mechanism. All the dependencies need to be specified in platform.xml as following and all the dependencies and resources to be packaged in the ANE.

Supplementary Characters Enhancement Support for TextField – EXTENDED BETA
This is a desktop enhancement for supporting surrogate pairs in the TextField control. Now, characters out of the Basic Multilingual Plane(BMP) with Unicode code points between U+10000 and U+10FFFF will work correctly in the TextField control. It greatly enlarges the code point range we support and includes characters like emotion symbols (emoticons) and complex CCJK characters. This feature is being introduced in the AIR 4 beta but will go live in a subsequent release. Due to the sensitive nature of text display, we would like an extended test period to ensure no bugs are introduced.

Stage3D Creation of Context3D with Profile Array
We’ve added a new interface to Stage3D.requestContext3DMatchingProfiles(profiles:Vector. ) which will create a Context3D with highest level suitable profile that is in profile array, based on the current hardware. A developer can check the newly added property ‘profile’ to obtain the current profile that was chosen by the Flash Runtime.

Ben Forta comments about the runtimes
Adobe’s Ben Forta has been posting updates to his blog whenever a new version of the runtimes is released. This has been seen by many as a good sign in terms of how Adobe views the platform (as opposed to the more prevalent “Adobe wants to kill Flash” nonsense). He recently posted about the AIR 4 betas and I thought it couldn’t hurt to ask about Adobe’s support of the runtimes and how the community might help convince Adobe to provide greater support. I feel kind of bad pestering him – as he must get tired of questions like this… so I really appreciate that he took the time to do so in response to my inquiry. I’m happy to see his comments on the subject are fairly calming (for those of us on the white-knuckled-edge of such things). It’s all about balance:

Now that attitudes are shifting back into balance, we’ll be better able to tell the story we want to tell, and that’s exactly why you’ve seen these recent announcements.

Thanks, Ben!

Feathers 1.2.0
A brand-new release of Feathers is out! Josh Tynjala writes: This release includes a few new components, including Alert, Drawers, and LayoutGroup. It also includes new base classes for item renderers that extend LayoutGroup. In my opinion, this is the best and most stable release of Feathers to date with performance enhancements and more, and I encourage everyone to upgrade. I made mention of LayoutGroup specifically in my Lynda.com course, Building a Mobile App with Feathers and Starling, and how it would be better suited to automatic layout that ScrollContainer (assuming one does not need scrolling!)

Feathers Cookbook
Alongside the new Feathers release is a neat Feathers Cookbook site. It includes simple and targeted tutorials about Feathers designed to demonstrate how to use or extend the components to implement specific common behaviors. This is a great format for sharing. Nice work!

Adobe’s Secure Real-Time Media Flow Protocol
As pointed out by Stefan Richter:


Adobe has published a memo detailing the Secure Real-Time Media Flow Protocol (RTMFP) specification to the Internet Engineering Task Force (IETF). an endpoint-to-endpoint communication protocol designed to securely transport parallel flows of real-time video, audio, and data messages, as well as bulk data, over IP networks. RTMFP has features that make it effective for peer-to-peer (P2P) as well as client-server communications, even when Network Address Translators (NATs) are used. Long time users of this technology may remember it in relation to project Cirrus.

Flixel Community 2.56 is out!
Fernando Bevilacqua writes about Flixel Community edition (Community fork of the popular Flixel game engine): Our main goal with this release was to maintain Flixel Community 2.56 as reverse-compatible as possible with the current version of AdamAtomic/Flixel (which is 2.55). We performed several tests to ensure a smooth transition and we hope you won’t need more than a few (or none at all!) tweaks to start using Flixel Community. Flixel is a great game engine for Flash and AIR and to see new life arise from the community like this is welcoming.

Flash Platform Rundown – Week of November 10th, 2013

A ton of things happened in the Flash Platform world over the past week. There is a lot to take in – so let’s get started!

Flash Player 12

Flash Player 12 and AIR 4 betas
This week saw the initial beta releases for both Flash Player 12 and Adobe AIR 4. The Adobe Flash Platform runtimes, Flash Player and AIR, together enable businesses to efficiently deliver rich customer experiences across multiple digital touch points. With Flash Player and AIR, content can easily and consistently move between the browser, standalone applications and native operating systems to reach users on the devices of their choice. This beta release provides access to the AIR 4 runtime and SDK for Windows, Mac OS, iOS, and Android.

Here’s some of the new stuff!

  • Mac .pkg Installation Support
  • Internet Explorer 11 on Windows 7 Support
  • Safe Mode in Safari 6.1 and higher
  • 64-Bit PPAPI Flash Player for Chrome
  • Graphics: Buffer Usage flag for Stage3D
  • Android Workers

New Version Numbering
With this new iteration of the Flash Runtimes comes a new way of numbering versions which more closely matches that of browser vendors. So we’ll still be seeing a new version of the runtimes release every quarter – but they will now be numbered in whole numbers. Happily, beginning with Flash Player 13 – AIR will align it’s version to 13 as well, keeping each runtime at the same version number for the future (which makes so much sense – should have been done years ago).

Killer Flash Platform Stats!
These stats are pretty amazing. 120,000+ distict AIR apps and 225,000,000+ new app installs? AIR is a performer with true reach! If only the marketing efforts at Adobe would embrace this – truly the most creative cross platform set of runtimes in existence. Give the runtimes team more resources, Adobe! AIR is for creatives of all types… EMBRACE IT!

PPAPI Debug Player!
The community has been clamoring for a Chrome PPAPI version of the debug Flash Player for some time now. Looks as though we may actually get it.

Great case for AIR
“Why the value proposition continues to tilt further towards Adobe AIR over native languages” lists a number of reasons why you should give AIR a chance if targeting Android and iOS. Some very compelling arguments are presented.

Chris Campbell Named Additional Runtimes PM
Hope to see more community activity from Chris in the coming days!

Citrus Engine 3.1.8
The awesome Citrus Engine 3.1.8 includes a number of new features such as a new multi-resolution solution, gamepads improvements, sound manager improvements, and updates the internal libraries to their latest versions.

Building a Mobile App with Feathers and Starling
Lynda.com continues to provide great content in support of the Flash Platform with Building a Mobile App with Feathers and Starling. In this course, author Joseph Labrecque shows you how to use the Feathers and Starling user interface frameworks along with Stage3D to build out mobile applications with Adobe AIR. After setting up the project (a fully functional drawing app), you’ll learn how to build application views, skin interface components with Feathers themes, and create the classes that will add functionality to the app, such as rendering, saving, and browsing sketches. The closing chapter demonstrates how to publish the project in a format suitable for Android devices, and concludes with installing and running the app.

Starling FullScreen No Stretch Extension Tutorial
This tutorial explains how to use the FullScreen No Stretch Extension for the Starling Framework. Starling is a great framework for building multi-platform software, especially games. Written in ActionScript 3, it mimics the traditional Flash display hierarchy, but is built on Stage 3D. This means that developers can write cross-platform software in the simple and familiar ActionScript language without worrying about serious hits to performance.

Reddit Thread on Flash Player
“Why is Shockwave Flash so slow, Why is Adobe unable to optimize it, and Why do websites continue to use it instead of moving to an alternative?” In this Reddit thread – both sides have at it and a lot of good information is the result.

Flash Platform Rundown – Week of November 3rd, 2013

As the end of the year approaches, I imagine news will thin out a bit as people go about celebrating holidays and wrapping up the current year. This may go bi-weekly during this time depending upon how much news there is. This week also includes a pretty significant milestone: the 2 year anniversary of the announcement by Adobe that they would no longer develop the Android browser plugin version of the Flash Player. The effects of that decision can be felt even today – but the most disastrous consequence is the gutting of what was an absolutely unique community of professionals enthusiastically sharing their knowledge and passion for the platform.


Adobe Gaming SDK 1.3 Released!
gsdk_toolboxWe are pleased to announce the immediate availability of Adobe Gaming SDK version 1.3, part of the Adobe Creative Cloud. The 1.3 release includes new features and updates for all framework components, including:
Mobile Workers (concurrency) BETA – Android
AIR Mobile support for background execution in “Direct” render mode
AIR Support for iOS7 and Mac OS 10.9
Starling – Updated to 1.4.1
Feathers – Updated to 1.1.1
Away3D – Updated to 4.1.5
Away Builder – Updated to 1.0
Dragon Bones – Updated to 2.4
AIR SDK and Compiler – Updated to 3.9

Away Games Maker
Away Games Maker (AwayGamesMaker) is a program for the creation of video games and / or applications that require the use of 2D/3D graphics. Taking advantage of technology Adobe Flash Player , Graphics Library Away3D version 4.1.1 Beta and physical library AwayPhysics version 1.0 (Bullet Physiscs) . You can use the software to create, animate, and color (materials and textures) your three-dimensional models, manage materials, lights, “videocamare” handle complex / multiple 3D scenes and effects, schedule and manage systems of particles, plan and manage physics, create new shader programs, manage video and menus (HUD – head-up display) to be inserted in the scenes, et cetera.

Here is a video demonstration.

Interview with Robert Bateman, founder of Away3d, an open-source 3D engine for the Flash Platform
In this interview we speak with Robert Bateman, the Director of the Away Foundation, about their key projects, their cooperation with JetBrains which is an Associate Partner of the Foundation, and their developers’ experience with open source software provided by JetBrains.

Pixel Mask Starling Extension
A Starling Extension to provide pixel based masking for Starling display objects. Check out the demos!