IxD Consultant ActionScript, Flash, Flex, AIR and Python

Interaction Design (IxD) is poised to become one of the main liberal arts of the twenty-first century.
Malcolm McCullough
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

As per my previous post here, I’ve followed the same approach, but this time using ActionScript 3.0 to produce my method for proper Arabic rendering in a dynamic TextField.

You can find this one here.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

I had my older AIR 1.1 application which uses encrypted local store data for saving specific settings per user, today when the AIR runtime gets updated to version 1.5 my application turned to a total mess!
I’m using various classes in my simple application that might cause this issue as far as I thought, like loading CSS on runtime or loading conditional states and components depending on certain parameters retrieved at login ..
I spent a few hours hunting down what actually happened and at last I think I figured it out ..
The new AIR has 3 new features, encrypted local databases, Flash Player 10 capabilities and the new WebKit update, it seems that Adobe somehow has made a change regarding to how the AIR runtime read and write the encrypted local data, and a simple try and catch block of code just revealed the problem ..

The following example assumes that there is encrypted data stored using an older version of the application complied using AIR 1.1, and the application checks for a certain key for loading the perspective CSS file, since the new runtime may not able to read the older version of the encrypted data then it should throw an error, at this point I reset any previous saved data and load a default CSS file in order to bypass this issue when any client update to AIR 1.5

var skinBytes:ByteArray;
var styleEvent:IEventDispatcher;
try {
	skinBytes =  EncryptedLocalStore.getItem("skin");
	if (skinBytes != null) {
		styleEvent= StyleManager.loadStyleDeclarations("css/"+skinBytes.readUTFBytes(skinBytes.length)+".swf");
	} else {
		styleEvent = StyleManager.loadStyleDeclarations("css/black.swf");
	}
} catch(e:Error) {
	//Alert.show(e.message);
	EncryptedLocalStore.reset();
	styleEvent = StyleManager.loadStyleDeclarations("css/black.swf");
}

Well, this is not an intelligent solution at all, cause these saved data my be much more complicated and I should not force my user to have it all wiped out just for upgrading the runtime!
Anyway, I’m not sure if my conclusion about the encryption handling change between AIR 1.1 and 1.5, especially that Adobe didn’t mention anything regarding to this particular issue as fas as I know, but I thought that may be this help someone else experiencing the same problem when migrating his application to the new AIR runtime ..

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)

I was working on a weekly events module ..
At some point I need to be able to get a list of week days by providing only on day, for example if I provide today date I expect the whole week contains today regardless to the current month or years ..

The following example shows how we can do that, with some extra features ..


source code available via flash context menu

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

The following method simply converts a given RGB value to hexadecimal format..
i.e. 0 > #000000

public function getProperColor(input:int):String {
	var color:String = "#";
	var checker:Number = 0;
	if (input.toString(16).length<6) {
		while (checker<6-input.toString(16).length) {
			color += "0";
			checker++;
		}
	}
	color += input.toString(16);
	return color;
}