New Year, New home work space.

New year needs a new work space. Thanks to IKEA.

You are seeing two table tops 59″ x 30″ x 1″ ($60 each). They were stained and covered polyurethane, and sanded with 220 grit for a smooth finish.

Attached with adjustable height legs for a 32″ lift. ($15 each).

Couple of book shelfs above that and you have a lot of space then what i had before.

HTC Incredible screen shot

Here is the screen shot of my HTC Incredible with the Sense UI 2.0, which allows 7 panels for the home screen.

HTC Incredible Screen Shot

The 3 panels on the left of the center home screen has all the most used widgets. Starting with the far left with the google calendar. Second to the left has the “dogg catcher” podcast widget, Tip calculator and “Key ring” widget. Third from the left has my quick profile widget and favorites.

Center screen has the default time and weather. Below that is the power strip widget for quick access to battery saving features. below are the apps that is sequential to the bottom four apps on the iPhone. Except the Phone icon on the left is replaced with “voice dialer” since the sense UI already had “Phone” on the bottom middle.

First screen to the right has all the apps that match the default home screen on the iPhone.

  • Messages
  • Calendar
  • Photos
  • Youtube
  • Stocks
  • Maps
  • Weather
  • Camera
  • Clock
  • Calculator
  • Notes
  • Settings
  • iTunes
  • AppStore
  • Contacts
  • Voice Memos

Notice, android does not have a pre installed “Notes” and “iTunes” app. So it was substituted with an equivalent app that I downloaded.

Second to the right, I added all the additional apps that was pre installed.

The last screen on the right has all the apps I downloaded and organized into its corresponding category.

Goodbye apple, hello android incredible

Flash developers unite. Ditch apple iPhone and get the Android.

The ultimate chair – Herman Miller Embody

Took the executive chair back to costco and replaced it with the Herman miller embody chair. As comfortable as the costco chair looked, it is not suitable for working.
Executive chairs are inclined slightly backwards so after few hours on the computer creates a stress on your neck. Chairs made for working has a slight incline forward making it easier to sit for many hours.

Actionscript 3: Detect hidden movieclip on stage overlapping buttons

If  you run into issues with an invisible display object covering your button but you don’t know where it is, this handy code snippet I got from my co worker Kris can trace it out for you.

Just drop it in your constructor.

function _checkMouseEventTrail($e:MouseEvent):void
var p:* = $;
trace(">>",,": ",p);
p = p.parent;

Actionscript 3: Using modulos to wrap a moving movieclip

A clean way to wrap a movieclip wrapping around the stage is to use modulos

var widthOfStage:Number = stage.stageWidth;
var velocity:uint = 1;
myClip.x = (myClip.x + velocity) % widthOfStage;

That part is easy. The difficult part is handling moving left when you encounter negative number. The solution to that is to add the original width back in to keep it positive.

var velocity:uint = -1;
myClip.x = widthOfStage + ((myClip.x  + velocity) % widthOfStage);

A problem you might occur is if you try to move back right, your clip might jump. So to keep both left and right movement synced modify the original right movement to:

var velocity:uint = 1;
myClip.x = widthOfStage + ((myClip.x  + velocity) % widthOfStage);

[ad#Google Adsense]

Actionscript 3: Bold not working on external fonts in a font family.

There was an issue with compiling external font swf made up of a font family in flex builder. For example when trying to generate a set of AkzidenzGrotesk regular, light, bold and black the bold will now show up.

Here is a typical font embedding code in an actionscript project.

package {

	import flash.display.Sprite;

	public class AkzidenzGrotesqueBold extends Sprite

		[Embed(source='assets/AkzidenzGrotesk-Bold.otf',  fontName='AkzidenzGrotesqueBold')]
		public static var AkzidenzGrotesqueBold:Class;


Every font will compile and generate a corresponding swf except bold.

To get around this issue make sure to define the font weight.

package {

	import flash.display.Sprite;

	public class AkzidenzGrotesqueBold extends Sprite

		[Embed(source='assets/AkzidenzGrotesk-Bold.otf',  fontWeight='bold' fontName='AkzidenzGrotesqueBold')],
		public static var AkzidenzGrotesqueBold:Class;


Don’t bother defining the fontFamily=”AkizidenzGrotesk”, CSS in flash will ignore it. It only uses the fontName=”blah”.
Bold font should have fontWeight=”bold”, italic font should have fontStyle=”italic” and a bold italic should define both.

Hope that helps

[ad#Google Adsense]

Actionscript 3: Get ratio value between two numbers

Simple utility for getting a ratio between two numbers. Thanks to my friend Jamie for the method.

private function returnValue(value:Number, actualMin:Number, actualMax:Number, ratioMin:Number, ratioMax:Number):Number{
     return (((value - actualMin) / (actualMax - actualMin)) * (ratioMax - ratioMin)) + ratioMin;

Here is also a simpler version when you know the percentage of the number range.

public function returnValue( percentage:Number, min:Number, max:Number ):Number {
    return ((( max - min ) / 100 ) * percentage ) + min;

This version returns a percentage of the two range of numbers.

public  function returnValuePercentage( _value:Number, min:Number, max:Number ):Number {
return ((( _value - min ) / ( max - min )) * 100 );

[ad#Google Adsense]

Actionscript 3: Detect the difference between a Mouse click and a Mouse drag.

How do you tell if the user clicked or dragged in your flash app? Take a look:

private var time:uint;

function onMouseDown(event:Event):void {
     time = getTimer();

function onMouseUp(event:Event):void {
     var diff = getTimer() - time;
     if (diff < 250) {

[ad#Google Adsense]