AS3


Create an Air ANE for Android to dispatch background tasks

If you are using DIRECT or GPU mode with Adobe Air you probably have already noticed that once the app goes in background it stops firing any kind of Event. This means that any task that dispatches Event will stop working. Luckily it is still possible to dispatch Events from an ANE. In this post I am going to create an ANE for Android that dispatches an Event every second which triggers a callback on the AS3 side. Assuming that you have already downloaded the Android SDK, open Eclipse and create a new Android Application Project naming it BackgroundTasker, also if you want change the Package Name, I changeds mine to com.lorenzonuvoletta.backgroundtasker. Click Next a bunch of times and you should have your project setup. You can also go ahead and delete… [Read more »]

flash-air-android

Air Android/iOS – Launch your App from the browser

Adobe Air gives you the opportunity on iOS and Android to create a personal URL that if called from a normal browser will launch your app instead. This is particularly useful if you are redirecting your users from your App to a website, and then you want them to return on your App after they have completed a particular operation. The cool part is that if you are listening for the INVOKE event on your App you can also catch some arguments that the website is sending back.

How to do it Lets say your personal URL is “awesomeapp“, every time you use that name instead of the usual “http” it will open your App. For example, if you write “http://www.google.com” in a browser, it will redirect to the… [Read more »]


Adobe Game Jam – San Francisco October 2012

Saturday 20 October 2012 I attended the Adobe Game Jam with a group of other people from my company.   It was the first of, I hope, a long series organized by Tom Krcha and Lee Brimelow at Adobe. We got the theme of the game 3 days before the event started, it was decided it to be “San Francisco“. We arrived there a little late since we had to fly from Los Angeles to San Francisco and our plane got delayed, at our arrival everyone was pretty much already there. Each team had to have a maximum size of 5 people, we were already 5 (3 programmers and 2 artists), so we started immediately to brainstorm about possible game ideas, we knew we didn’t have too much time, we… [Read more »]

Alacatraz Roller Escape

Create an infinite scrolling world with Starling and Nape

Many of you have probably used Box2D to make physic games, although for a few years I have been using Nape. Nape is much faster and optimized than Box2D, and finally has an API that makes sense. It is also updated frequently and the author, Luca Deltodesco, is a great guy. In this tutorial I want to show you how easy it is to create an infinite scrolling physic world using Nape and Starling, so you can not only leverage the speed of Stage3D, but also the amazing performance of this physic engine. This is what the final result will look like (click to play it): In this example the camera is fixed on the Player and the terrain is made of slices. You can change the width of the… [Read more »]

Nape Physic

How to create your own ANE for iOS using Adobe Air

Adobe Air gives us the amazing opportunity to access the device capabilities using extensions, also named ANE (Adobe Native Extensions). Creating an ANE is pretty simple, although it requires a laborious process which is not always easy to remember. Adobe has some tutorials about it, but I find them a little confusing and not straight to the point. This is a step by step guide with the very basic knowledge to know to build a simple ANE for iOS. The ANE we will build doesn’t really have any use, it will simply return a String from iOS that says “Hello World!”. Although this is a kick start to create any other Native extension. Soon I will post some more examples to generate more complex behaviors. Tools First thing, you need a Mac,… [Read more »]

Adobe Air ANE

How to apply a 9-Slice scaling on a Bitmap

If you are trying to apply a 9-Slice scaling on a Bitmap, by now you have already found out that is a big pain in the butt. If you don’t know yet, a 9-Slice scaling can be activated by going in the properties of your symbol and check the proper button as showed in this image: If you do this you are pretty much telling Flash that you only want to scale the inside part of your MovieClip, this trick though only works for vectors (not even that good sometimes). So what to do in case you want to scale a Bitmap? You can use this approach, what I am doing here is very simple, I am dividing the image in 9 parts where the corners are always the same, and… [Read more »]

button