I created a Google Code repository for my winning submission to the Adobe AIR Cookbook Cook-off. The MigrAIRable library contains the source, an ANT file to create the SWC, and an example tree to demonstrate how to use it.
If you haven’t read about MigrAIRable yet, it is a solution to allow your serialized data structures to have migrations, so that adding new fields to later versions to your class will not break your serialization when reading older versions of the data.
I’ll be presenting an introduction to Flex tonight at Refresh Baltimore. If you’ve been wondering what Flex is and have been meaning to look into it, this presentation will be right up your alley.
I was waiting to post this until the results were announced which they were today. O’Reilly just posted the winners of the Adobe AIR Cook-off and I’m pleased to say I won the grand prize!
I have a follow-up recipe I haven’t gotten to write up yet, but I’ll try to get it up in the next week. It will provide a solution to add the marker which is required for this serialization to work to the front of your structures if you already have files being serialized in an existing AIR application and you want to start taking advantage of this migration technique.
A few days ago one of the commit messages in the Gumbo trunk mentioned some work for advanced CSS was beginning. I tried to create an example of using a descendant selector as well as an ID selector, but neither worked.
Tonight, another commit message said that this was now in place by default (I guess it would have worked earlier, but I needed to be specify a compiler argument). But now, after rebuilding the latest checkout of Gumbo you should now be able to compile the following example to see the advanced CSS selectors working. Below is the SWF (you’ll need Flash Player 10 to view it) and the code follows:
When you’re ready to deploy your first Flash Player 10 SWF, you’ll want to ensure your users have the latest Flash Player so they can actually view your content! Why not make it as easy as possible for them to upgrade and use SWFObject to embed your SWF and seamlessly upgrade older version of the Flash Player up to 10?
Let’s say you’re embedding a SWF called MyFlashPlayer10.swf. Using the dynamic publishing method there are just 3 simple steps to follow to get your SWF embedded with SWFObject…
A few times a day I update my subversion checkout of the Gumbo trunk. Last night I noticed a major overhaul which renamed all the Flex 4 classes, repackaged them into the mx package instead of flex. The new classes are now all (at least temporarily) prefixed with Fx, so if you are trying to compile your previously working Flex 4 code against the up-to-date SDK and suddenly see the following error:
Error: Could not resolve <Application> to a component implementation.
your issue will be resolved by changing Application to FxApplication. You’ll need to do the same for most of the other Flex 4 controls (Group, VGroup, and HGroup are exceptions that don’t need to be prefixed with Fx).
Spark Theme
You may also notice the new spark folder added in the skins directory. Below is an example application showing what these new skins look like for some of the Gumbo components: (more…)
One big improvement in Flash Player 10 is that fonts no longer need to be embedded in order to rotate text or alter it’s alpha. Below is a simple example demonstrating both of these features by using the Rotate and Fade effects in Flex 4.
It solves the problem of having your AIR application store an IExternalizable class on disk but then later adding more fields to that class. How would you read the old version of the class without encountering a runtime error if you tried to read the new field that wasn’t present in the older serialization?
Go check it out the cookbook entry to find out how to do this and please rate the article!
I’ve encountered some odd behavior that I would have expected to work when calling readObject() to de-serialize an array of anonymous objects. If anyone knows what’s going on here, please enlighten me. I’ve also filed a bug on Adobe’s bug tracking system if anyone wants to follow the progress at Adobe’s end.
I’m trying to read all of the bytes in the readExternal() function of a class implementing IExternalizable, so that I may use the position property to move back in stream in case I need to do so. The problem only seems to occur if I am trying to de-serialize an Array of anonymous objects. If I put plain old Strings in the Array it will work fine. I find this odd since I would expect
publicfunction readExternal(input:IDataInput):void{var arr:Array = input.readObject() as Array;
}
to have the exact same behavior as:
publicfunction readExternal(input:IDataInput):void{var ba:ByteArray = new ByteArray();
var inputBytes:uint = input.bytesAvailable;
input.readBytes(ba);
var baBytes:uint = ba.bytesAvailable;
var arr:Array = ba.readObject() as Array;
trace("inputBytes == baBytes ?= " + (inputBytes == baBytes)); // traces "inputBytes == baBytes ?= true}
In Part 2 we added hovered and selected states to the ItemRenderer for the list items. In this part we’ll add some transitions to make the list look more like an Accordion. Since screenshots won’t do the example justice this time, I’ll show a screencast I made demonstrating the result first:
(Sorry for the embed being cutoff, still figuring out the params to this word press plugin. Click through for the full embed on its own page.)