Color Value To Hexadecimal

A simple utility class that will help you convert a color value (from numbers) to hexadecimal color value.

Basically you can convert the color value to hex string with colorNumber.toString(16);
Now, if you have this shade of blue “13311”, for example, it will be converted to “33ff”.

You can fix that with while(hexColor.length < 6) and add “0” to in front of the hex color output.

Read more
Numbers to letters with ActionScript 3

Numbers-to-letters Today I’ve been working on a project where I needed to convert numbers to letters.

I’ve made a nice utility class for this simple task.
Not sure if it’s the best way but it works perfectly fine.

Basically I have an array where the items need to be in alphabetical order instead of numbering them with 1,2,3,4,etc.

Read more
Image loader

I did not updated this blog lately because I was working on some flash projects… and now I want to share with you the code that I use for most of my images when I load them externally.
I used this code a lot in MotorRocks.com and other sites…

import mx.transitions.Tween;
import mx.transitions.easing.*;
 
var listener:Object = new Object();
listener.tmc = target;
listener.onLoadInit = function(mc:MovieClip) {
	new Tween(mc,"_alpha", Strong.easeOut,0,100,2,true);
};
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(listener);
 
loader.loadClip("image01.jpg", holder);

I think this is the easiest way to preload images and when loaded… to fade them in.
It’s a nice effect and you can use it on your projects if you want 😉

Download Source Files