Just received the Starling books! Grab one!

Starling bookWhat a cool surprise today, I received the print copies of the Starling book. For recall, the book has been available for a year now at O'Reilly's website as a downloadable ebook.

I read lots of digital books but I still enjoy reading stuff the old school way, I am sure you do too. Adobe ordered some hard copies that we will be able to distribute at some events. It feels great to physically hold it! For info, this printed version has the latest updates I added last month that I mentioned here.

I thought it would be cool to give a few free copies, if you want to have it or have colleagues that would be interested. The first twenty comments will receive a free copy. Just put your real email when commenting so that I can reach out to you ;) They are all gone!

Have a good reading!

Query Graphics Data – Live demo

I wanted to post the demo of the example I posted the other day as a video. It is using the new Query Graphics API we are introducing in Flash Player 11.6/AIR 3.6. Make sure you have Flash Player 11.6 and check the demo below. Just click anywhere to sample the graphical objects from the MovieClip then reconstruct it at runtime:

Get Adobe Flash player

Here is the very simple code below, note that the API is now called readGraphicsData. You can download the full source code here:

	import flash.display.IGraphicsData;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	[SWF(width="900", height="400", frameRate="30", backgroundColor="#FFFFFF")]
	public class TestGrabby extends Sprite
		private var b:BigBilbo = new BigBilbo();
		private var v:Vector.<IGraphicsData>;
		private var result:Vector.<IGraphicsData>;
		private var copy:Sprite = new Sprite();
		private var inc:int;
		private var count:int;
		public function TestGrabby()
			b.scaleX = b.scaleY = .7;
			copy.scaleX = copy.scaleY = .7;
			b.x = 240;
			b.y = 200;
			addChild( b );
			copy.x = 650;
			copy.y = 200;
			addChild ( copy );
			stage.addEventListener(MouseEvent.CLICK, onClick);
		private function onClick(e:MouseEvent):void
			// reset
			inc = 0;
			stage.removeEventListener(Event.ENTER_FRAME, onFrame);	
			// sample
			v = b.graphics.readGraphicsData(true);
			count = v.length;
			result = new Vector.<IGraphicsData>(count, true);
			stage.addEventListener(Event.ENTER_FRAME, onFrame);	
		private function onFrame (e:Event):void
			if ( inc < count )
				result[inc++] = v.shift();
			} else stage.removeEventListener(Event.ENTER_FRAME, onFrame);

I hope you guys will like it!

30 Rock – Tina Fey is sad about Flash Player 11.4

Don't worry Tina, Flash Player 11.4 is doing ok, we are taking good care of it ;)

Angry Birds Star Wars powered by Starling

Angry Birds - Star WarsA new version of Angry Birds has been launched recently by our friends at Rovio, please meet Angry Birds Star Wars!

Note that Angry Birds earlier this year (February 2012) was the first super popular game to use the Stage3D APIs through the use of the Starling framework.

We are super excited to see this new version also powered by Starling, have fun! See you on Tatooine.

Make your SWFs profilable with Scout

Scout logoI wanted to post a quick note about enabling your SWFs for Adobe Scout. There has been lots of discussions on Twitter and forums about that. Actually, this is something we have not really documented entirely and we will fix that very soon. Don't forget you can ask your questions on the Adobe Scout forum, we will be happy answering all your questions! Make sure you also check the Adobe Scout Vimeo channel, with video tutorials!

As you know, to get full profiling working with Scout, the SWF needs to be enabled for profiling. So to make it quick, today there are three ways to enable your SWFs with Scout.

The first way, is by using Flash Builder 4.7 and use the Telemetry option in the ActionScript compiler tab in your ActionScript project properties:

Telemetry UI

The second way to enable your SWF, which most of you probably don't know is to use the -advanced-telemetry compiler argument when using ASC 2.0. This is useful if you are using a tool like Flash Develop or any others for instance.

As a reminder, ASC 2.0 is the new compiler for ActionScript that is provided inside the AIR SDK bundled with Flash Builder 4.7 and the Gaming SDK. The UI above in Flash Builder actually just does that and appends this string to the arguments passed to the ASC compiler:


Finally, the third way to do it, is by using the post processing script. Which is useful in a scenario where you don't want to recompile the SWF, or cannot, because you don't have the sources anymore. Or if you are using Flex, because the -advanced-telemetry argument is only available in ASC 2.0 and not MXMLC. In this scenario, you just process the SWF and inject the specific tag required. We have a little Python script for that available here.

But this script requires Python and we have seen people having issues with this, so recently Renaun created this little app called Scout Enabler, which is all AS3 based, so no dependencies at all and has a nice GUI on top:

Scout Enabler

I hope this clarifies things. We will integrate that in the Getting Started document for Adobe Scout, so that it is clear to everyone and easy to find.