mxml.it
avoid mickey mouse programming
avoid mickey mouse programming
Aug 13th
Today I have had the opportunity to play a lot with Flex and the Dictionary class.
In ActionScript 2.0 when i needed something very simple to hold my data, I used pure Objects or their subclasses with bunch of methods, now we have more specialized class for this – flash.utils.Dictionary.
The Dictionary class lets you create a dynamic collection of properties, which uses strict equality (===) for key comparison on non-primitive object keys.
What I need today was a class able to handle a Dictionary in order to solve this tasks:
The result is a class named DictionaryUtility that get a class definition, maps this definition to an object exploring the accessor methods and the public property of the class and that create a Dictionary dinamically.
In order to get the class definition I have used the utils package
var description:XML = flash.utils.describeType(classMap);
In order to recover the items collected in the Dictionary I used a simple for…in loop and the ArrayCollection class
public function getEntries():ArrayCollection {
var list:ArrayCollection = new ArrayCollection();
for (var key:* in dictionary){
list.addItem(dictionary[key]);
}
return list;
}
The sample is available here and the source is here, I hope that someone may get some inspiration or help from this.
Aug 3rd
In the last months I have had the opportunity to play with this kinds of things in two real projects. The first opportunity was to play with music and to create some nice effects that reacts to the music, the second one was the creation of an AIR widget for the ftp of large files that can be launched from a web page.
In this short post I want to share this samples (source view enabled) that I created for the Cartier project:
http://www.mxml.it/samples/spiralizerMusic/spiralizerMusic.html
http://www.mxml.it/samples/soundspiral/SoundSpiral.html
Each samples plays with ByteArrays, SoundMixer.computeSpectrum and a lot of fantasy, hope that this files will be useful for others developers.
Jun 25th
This beta release of the update framework for Adobe AIR Applications provides APIs to assist developers in including good update capabilities in their AIR applications. The functionality present in update framework assists developers in the following:
* Periodically checking for updates based on an interval or at the request of the user
* Downloading AIR files (updates) from a web source
* Alerting the user on the first run of the newly installed version or performing data migration
* Confirming that the user wants to check for updates
* Displaying information to the user on the new available version for download
* Displaying download progress and error information to the user
The update framework supplies a default user interface that your application can use. It provides the user with basic information and options related to application updates. Your application can also also define its own custom user interface for use with the update framework.
For more info chek this link.