Jan 30

I was doing programmic skinning yesterday and was wondering how i can make a gradient goes from a lighter tone to a darker tone if a user choose 1 color. for example, if the user choose a blue color, I want the skin to goes from light blue to dark blue, from top to bottom. Initially, I though I will have to do some hexidecimal calculation and when to google about it. Then, I though I should just check out Color related class in Flex and I found the ColorUtil class. That do the job!

So the codes goes like this if you want to take a look:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
//This class extends BorderSkin
[Bindable]public var color:uint = 0xffcc00;
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
 
	super.updateDisplayList(unscaledWidth, unscaledHeight);
       this.graphics.clear()
 
	var matrix:Matrix = new Matrix();
	matrix.createGradientBox(unscaledWidth,unscaledHeight, Math.PI/2);
 
       // using ColorUtil, adjustBrightness increase brightness by 40 (you can use -255 to 255)
	this.graphics.beginGradientFill(GradientType.LINEAR,
[ColorUtil.adjustBrightness( color, 40),  color  ], [1, 1], [0x00,0xff], matrix);
 
this.graphics.drawRoundRect(0,0, unscaledWidth, unscaledHeight, 10)
this.grahpics.endFill()
 
		}
Jan 23

I booked my Flex Exam a few weeks back and it is suppose to be on today. Coding day and night ,I totally forgot about it. Thankfully, the administrator at Sun Microsystem Education Center(I took there as it is nearest to my home) called me at 12.15 (which is my exam time) to ask me if I was coming. I got the shock of life, grab a shirt and take a cab to the test center. Fortunately for me, there is only 1 candidate today and she let me continue to take the test. I am sure other test center will not do that. Good news is that I managed to pass the exam, so I am now a Adobe Certified Flex 2 Developer ! =D

Will be applying for Flex 2 Instructor too once the records are in the web. Phew. Thanks to the admin who saved my $225 test fee. =D

Jan 21

I watch Cloverfield yesterday night. Honestly speaking, I got no idea what this film is about. Me and my dear walked into the cinema and everywhere is korean/thai/japanese “the most scary movie ever”. We are like “come on, we are sick of ghost”. Then i saw this Cloverfield status with the half-broken status of liberty and so, we go for it.

Watching the first part reminds me of the trailer I saw during Transformation and I then realize that it is it, so I am all there expecting a great movie. The movie is great, it takes me too the eyes of the characters and I can feel I am part of the event. The movie along, might be ‘not so indepth’ on first look. It is only when i googled about it that I realize how in depth the story is!

First of all, each character in the movie has a myspace page, that leads to the event, including Rob’s interview, and how they plan the surprise party. the last login of each account ends at 18th Jan, the end of their death.

Secondly, many websites has spawned to talk more about the origins of the monster. This include the reporting of ‘fake incidents’ and the japan company Tagruato (which Rob is joining and has deepmining facilities all over the world) , the deep-mining facility near NYC being collapsing, hackers hacking the mining company website, stating that they are “harming the ocean”, websites talking about the company’s conspiracy, stating that there is no oil at the NYC mining facility and they knew it before building it, etc. How things link together to create an excellent marketing masterpiece is impressive. Even now, the company website has been “taken down” (tagruato.com) on the date 18th Jan, creating a very ‘real time’ like.

If only Resident Evil can do something like this, won’t it be great (Like Umbrella going to do something..again..etc) ? I bow to Cloverfield team. I believe from now on, my movies will use the same marketing tactics, creating myspace accounts for the characters. Hmm, imagine a myspace account for characters like..”Iron man”

Jan 10

I was asked a question this morning regarding how to add the more than and less than operator in MXML. Seems like many who just started MXML face this issue.

For example , you have something like this:

1
<mx:VBox visible="{this.numChildren > 5 }" />

The preceding code will not compile. For greater than, use > and for less than, use <

So it will be

1
<mx:VBox visible="{this.numChildren &gt; 5 }" />

Happy Flexing!

Jan 07

Firstly, thanks everyone for supporting AirTalkr. The Airtalkr server has been down for 2 days last week due to an unexpected hardware failure in the RAID configuration. It has since been resolved. AirTalkr has now to date 10000 users and I will like to thanks all the users for supporting me since Beta 1 and bearing with all those ’scary exception’ that AIR throws.

I am currently in the process of rewriting AirTalkr for AIR Beta 3. I am rewriting it because previously, AirTalkr uses full-screen mode as NativeWindows + Flex is giving lots of problem in Beta 1. Also, I am implementing it now in Cairngorm, to achieve cleaner code and maintainably. I am also adding a couple of performance tuning, eye candy, and more intuitive UI to the entire application.

The basic functionality like AirCard, YouTube and Flickr integration will remain, coupled with a few others new fun functionality to play with. They will of course, be tied tightly to social networking stuff =) In next version, you will see your buddies avatar (for msn, icq, gtalk), as well as change the skin colors and customize it your liking. These are already done , but I am not releasing them as I want the entire thing to come out with all its new version implemented, as I am also going through the feature release list that you guys gave me over the past few months.

Of course, if you want to volunteer to help me testing it out, I will be more than happy to accept it =). Scheduled time for the next release will be end of January. I hope I can squeeze as much time I can to finish it.

Jan 07

As many might know, XIFF is designed to way with wildfire/openfire server as well as an additional list of compatible server on its list.

If you tried to connect to ejabberd server using XIFF, you might get disconnected right after you connect. To solve this problem, use the xiff patch by Nick Velloff http://www.velloff.com/?p=36,
and following that, you have to use XMLSocketConnection instead of XMLConnection to connect to the ejabberd server, with the streamtype as “standard”.

Following that, the rest will works fine.


Video title:

Description: