Posts tagged "iOS"

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.

Troubleshooting common Adobe AIR installation errors with iOS applications

air_3_icon_rgb

By Piyush Bagri

In this post, we will explain the possible causes and solutions for some general errors that may occur when installing an AIR application on iOS devices using Flash Builder, Flash Professional, or command-line. This will help you to narrow down the installation error to a specific cause so that it can be resolved easily.

Installation error: “Application verification failed.”

The possible causes for this installation error along with the solutions to rectify it in each case are specified here.

Wildcard characters used in application id

If you are using any wildcard characters in the application id in your project, for example ‘calculator.debug.*‘, you will get ‘application verification failed‘ error.

Solution: The error will be resolved as soon as you remove the wildcard characters from the application id.

Feature listed in application.xml file is not added in the provisioning profile

If you are trying to compile your IPA with aps-environment key in entitlement.plist tags in application.xml file as shown in the example below and push notification service is not enabled in provisioning profile, then also you will get ‘application verification failed‘ error.

Example: Entitlements tag has been added in application.xml file but the push notification service is not enabled in provisioning profile.

...
<Entitlements><![CDATA[
            <key>aps-environment</key>
            <string>development</string>
             ]]>
</Entitlements>
...

Solution: Simply comment the above section of the code in application.xml or else add the feature in the provisioning profile. You will be able to rectify this error and compile your project. For more details, see Using push notifications in AIR iOS apps.

Wrong certificate used for packaging

You can also get ‘application verification failed‘ error if there is something wrong with the developer certificate that you are packaging your AIR application with. Another reason for the error could be that your device UUID is not listed in the provisioning profile.

Solution: You will be able to install your app on the device when you connect the right certificate with your provisioning profile. To know more about applying for an iPhone developer certificate and creating a provisioning profile, see Obtaining and working with iPhone developer files.


Installation error: “iTunes mobile device library not found. Please check your iTunes installation.”

This installation error is mainly related to the version of Adobe Flash Professional CC and/or AIR SDK that you are using to connect with Apple iTunes while installing the AIR application on your device. You may get this error in the following cases:

Using Flash Professional CC 2014 with iTunes 12.1.2

If you are using Adobe Flash CC 2014 and AIR SDK (any version) with iTunes 12.1.2, you may get this installation error when in your Flash Professional CC project you select:

File > Publish >Install application on the connected iOS device

Solution: This issue has been fixed in the latest Adobe Flash Professional CC 2015 version. With this fix, it can now be used with Adobe AIR SDK (any version) and Apple iTunes version 12.1.2 in Windows environment.

Using ADT version 16 or older with iTunes 12.1.2

If you are trying to install your application on the iOS device by command-line using ADT version (same as AIR SDK version) 16 or older, you can encounter this error. ADT is not able to detect iTunes 12.1.2 library in this case.

<AIRSDK Location>/bin/adt –installApp –platform ios –package <package name>

Solution: It is recommended to use Adobe AIR SDK version 16 or newer to resolve this error. iTunes 12.1.2 library is detected by Adobe AIR SDK 16 or newer versions.

Using ADT version 20.0.0.177 or older with iTunes 12.3

If you are trying to install your application on the iOS device by command-line using ADT version (same as AIR SDK version) 20.0.0.177 or older, you can encounter this error. ADT is not able to detect iTunes 12.3 library in this case.

Solution: With AIR SDK 20.0.0.178 build this issue has been resolved.


Installation error: “PackageInspectionFailed”

This installation error is mainly related to the version of Adobe Flash Professional CC and/or AIR SDK that you are using to connect with Apple iTunes while installing the AIR application on your device.

Solution: With Flash Builder 4.7, cleaning your project solves this error.

To clean you project, choose Project> Clean > Clean All Projects. See Build projects in Adobe Flash Builder 4.7 documentation for more details.

***

Typically, you want to have the latest version of Adobe AIR. To get it, follow the instructions at Download and install Adobe AIR. However, you can get an older version of Adobe AIR here.

Do you still have problem with the installation of Adobe AIR application? Post your question in the Adobe AIR Installation Issues forum.

Adobe Gaming & Buffalo Studios: BINGO Blitz

BingoIn creating BINGO Blitz, the developers at Buffalo Studios have cut out the crowded, smoky rooms and uncomfortable chairs and delivered a digital bingo experience that everyone can enjoy.  Using Adobe Gaming technology such as Flash Pro and Adobe AIR, the team has ported the original Facebook incarnation of the game to Android and iOS platforms.  With a player base of over 16 million game installs, Barry Sohl, senior vice president, knew the team could still push their game to a wider audience: “Players today demand high-performance, cross-platform experiences on every device. Adobe Game Developer Tools deliver on that promise.”

Adobe technology has allowed Buffalo Studios to extend their intuitive gaming experience from desktop to mobile platforms.  The game’s smooth visuals were created using the Adobe Creative Suite and the framework, user interface, and overall experience were built entirely in Adobe Flash Professional.  Keeping the entire development pipeline under one umbrella has allowed a single development team to release weekly content updates, seasonal Bingo rooms, and bring new features to market more quickly.

BINGO Blitz offers hundreds of simultaneous players a chance to participate in a modern, mobile version of Bingo that has already been downloaded over 1 million times.  The experience developing and porting the feature-rich game to multiple platforms has made a believer out of Buffalo Studios for their next projects. “We are basing all our current and future titles on Adobe Game Developer Tools.” After the success of BINGO Blitz, we can’t wait to see what Buffalo Studios comes out with next! You can learn more about their streamlined development process here.

Adobe Gaming Spotlight: Smart Aliens

Looking for a fun new take on an old classic, maybe with a dash of outer space? You’re in luck! The team at Etamin Studio has created the playful and terrific looking Hangman game, Smart Aliens. This free iOS app comes complete with smooth game play, hilarious animations, and new twists on the Hangman you remember. Challenge your friends, and get in the game.

The Etamin team developed this experience using Adobe Gaming technologies and the Starling framework. They chose the technology not just because of its cross-platform capabilities or high performance level, but also because of the great community supporting it. A social game like Smart Aliens deserves a social audience. You can learn more about the extensions and details that went into the game’s creation here. If there’s demand for it, an Android and Facebook version will be on the way too.  For now, you can download it on iTunes.

Take a closer look at the game’s wordplay fun in the video below and visit gaming.adobe.com for more stunning examples of games powered by Adobe:

Zynga Leverages Adobe AIR to Take Ruby Blast Multi-Platform

Rubies – now available on your mobile device! You can now play Zynga’s Ruby Blast not just on Facebook and Zynga.com but also on mobile, marking another successful game for which Adobe Gaming technologies have been used to deliver explosive graphics, action-packed sound effects and gorgeous particle effects on any device. Ruby Blast was Zynga’s first game optimized for hardware acceleration, supported by Flash Player and Adobe AIR, and successfully extended across multiple platforms while preserving the beauty and speed of the original Ruby Blast web game for a seamless experience.

While creating Ruby Blast, Zynga developed performance optimizations that have been integrated back into the open-source Starling framework, benefitting all developers leveraging the same technologies for their own games. By using the Starling framework today, indie developers and studios benefit from the ongoing innovation brought by companies like Zynga and Adobe and the entire community which has grown up around Starling.

Visit www.itunes.com/appstore to find out more about Ruby Blast and start playing today! And check out gaming.adobe.com to learn more about Adobe Gaming technologies, and how we are helping game developers of all levels reach the widest audience on desktop and mobile.

Gaming Spotlight: FreshPlanet’s SongPop

How fast can you name a song clip? That is the question that SongPop, a game by FreshPlanet, puts out there for music fans looking for a challenge. This wildly popular music trivia game makes the most of social gaming, offering over 5 million daily Facebook and mobile app users the chance to compete to see who can name that song faster.

SongPop delivers a unified experience across desktop browsers on Facebook and extends that experience to mobile apps for iOS and Android. In using Adobe Gaming technologies, FreshPlanet was able to leverage a single code base, instead of having to build native apps for each mobile platform, and was able to easily streamline the workflow between designers, developers and animators.

FreshPlanet CTO and VP of Products Olivier Michon noted that Adobe Gaming technologies, “enabled us to code at top speed in Adobe ActionScript [and] rapidly integrate design assets and animations,” making development so easy that it only took two developers and one designer less than three months to complete SongPop for iOS and Android, and only one more month to launch it on Facebook.

For more on FreshPlanet and SongPop, check out their full story in, “Adobe Gaming & Fresh Planet: SongPop.” You can also get your hands on open sourced Native AIR extensions from FreshPlanet on their GitHub profile: https://github.com/freshplanet.

Developer Spotlight: A Follow Up with Jordan Casey of Casey Games

We had the chance to reconnect with young developer Jordan Casey, who recently released a new gaming app – Greenboy Touch. In our Developer Spotlight back in July, Jordan mentioned that he was going to slow down, but that obviously wasn’t the case! Read up on our latest interview with Jordan to find out more about his inspiration and the making of his latest Android and iOS game submitted to our Flash Rocks gallery.

What was your inspiration behind your new app, Greenboy Touch?

Greenboy Touch was based off a Flash game I developed about 2 years ago. I’m always trying new genres and I love different game concepts. While most of my games are just one specific style of gameplay, Greenboy Touch is made up of tons of different concepts. It is sort of a puzzle game.

We’d love to share more about the making of the app with our readers. What Creative Suite products did you use and did you have any favorite features?

I used Photoshop and Illustrator for graphics – they’re great tools! To develop the game I used Adobe AIR for iOS and for Android. I programmed in ActionScript 3.0, Flash and AIR, which are amazing. With the click of a button, I could switch a Flash game to a desktop app for Mac or PC back to an Android app to an iOS App. The program is great because it’s really visual and really powerful. ActionScript is an amazing language, and though so powerful, quite easy to pick up.

What was your experience like using Flash to create for Android and iOS? Are there any tips you would share with other developers?

The process was great. Like I said, with the click of a button I could go from iOS to Android. It’s just great. It’s the same as making a Flash game – the exact same, and with just a click, you get a native app! Just like that! It’s magic!

You’re juggling school and development. We want to know – what’s your secret? How are you doing it all?

Well, it is tough juggling between school, development, and lots of speaking events. To make up for time I missed while I’m away speaking, I take a 2-hour study course after school to catch up or study for exams. That way, I have my homework done and I can develop for about an hour or so.

Check out Greenboy Touch in action below.

From Rock the Vote to Smash Vote!

With the U.S. elections in high gear, it’s time to channel your pre-election day passion and energy into Smash Vote, a new game from Mighty Bits built with Adobe Gaming technology. Mighty Bits is a mobile development shop in Las Vegas that focuses on mobile games, utilities and entertainment apps for iOS and Android. In their latest creation, you can choose your representative and get ready for some arcade style fighting action in this mobile app.

Built using Flare 3D and AIR 3.4, Mighty Bits’ tongue-in-cheek take on politics gives players a chance to debate the old fashioned way – a bi-partisan chance to learn who can really rumble – much like last night’s debate. Featuring crisp graphics, six playable politicos straight from Washington D.C., and a global ‘exit poll’ tracking system to compare against other players, there’s lots of fun to be had. To find out more about games with Adobe Gaming technology visit gaming.adobe.com.

Adobe Flash Player 11 & AIR 3 Have Launched!

Adobe MAX is here, and we’ve got a lot of news to share. Today we’re releasing Flash Player 11 and AIR 3 — you can download the release starting at 9:00 PM Pacific today. As we announced previously, there are lots of new features in Flash Player 11 and AIR 3, and one of the newest features that’s getting a lot of buzz is hardware accelerated 2D and 3D graphics rendering through Stage 3D, which will be available on Mac OS, Windows and connected televisions. It redefines what’s possible across the web. With up to 1,000 times faster rendering performance over Flash Player 10 and AIR 2, developers can animate millions of objects with smooth 60 frames per second rendering and deliver cinematic, console-quality games both in browsers and in apps. And a production release with support for Stage 3D for mobile platforms including Android, Apple iOS and BlackBerry Tablet OS is expected in an upcoming release. For more information about Stage 3D and to see some sample apps, check out the Stage 3D games on the Adobe Developer Center.

Additionally, we’re excited that “Proscenium,” a 3D framework technology preview, is available on Adobe Labs. Proscenium will allow developers using Flash Builder to rapidly prototype experiences focused on simple content interaction and display, whether for simple games, visualization, or high-quality rendering of small object collections. Check it out and let us know what you think.

We previously announced the availability of the Starling 2D framework for stunning hardware accelerated, fluid 2D graphics, and you can check out a new game developed using the Starling framework, Whack! from BxyB. There’s also new information for available for developing using 3D frameworks like Alternativa3D, Away3D, Flare3D, Mixamo, and Minko.

And lastly, we want to extend a welcome to our newest developers and colleagues from Nitobi, makers of PhoneGap, which will soon become part of the Adobe family. With all of our announcements today, we believe developers will benefit from a workflow that allows them to choose the right tool for the right job, and we’ll continue to keep driving innovation in Flash so you can push the edge of the envelope for immersive experiences online.

We’ve already seen some early previews of games and apps that will be available in market soon, and there are now over 10,000 AIR apps in mobile markets.

We can’t wait to see what you’ll create. And there’s more news to come tomorrow, so stay tuned. You can watch the second day MAX keynote streamed live at 10am PDT, and be sure to check out the Flash Platform Blog for the latest updates.

Tom Nguyen
Sr. Product Manager, Flash Player & AIR / @tomng

Flash-Based Machinarium Game is Now #1 iPad App, Delivered Using Adobe AIR

We’re very excited to announce that Machinarium, an award-winning, point-and-click adventure and puzzle game developed with Flash technology is now the #1 iPad app in all paid categories in the U.S. and 12 other countries after just one day! This popular app comes on the heels of other top rated, Flash-based apps on iTunes, Android Market and BlackBerry AppWorld like Politifact (#1 news app on iTunes, Top 100 app in all of iTunes), Dr Stanley’s House (#1 most popular gaming app on iTunes China) and apps from ESPN, Coca-Cola, Facebook, California Academy of Sciences and others.

Previously available as an in-browser game on desktops via Flash Player, Machinarium was ported as a Flash-based app for the iPad 2 and is coming to Android Market and BlackBerry AppWorld soon – all with the power of Adobe AIR. Machinarium is gaining traction worldwide as the top app in iOS App Stores in several other countries as well, and is also the iPad Game of the Week. The game was designed by Amanita Design in the Czech Republic and one of our gaming evangelists, Tom Krcha, has posted an interview on his blog with Machinarium designer and director, Jakub Dvorský. Check it out, and you can download the game here!

POST UPDATED: 9/10/11