Archive: November, 2008

Useful HexColor Extract Code

This code help me solve many cool effect and also shorten my writing. Also sometime it is easily to forget so here is another good tips to note on here 🙂

var colour:uint = 0xFF297400;
var A:Number = colour >> 24 & 0xFF;
var R:Number = colour >> 16 & 0xFF;
var G:Number = colour >> 8 & 0xFF;
var B:Number = colour & 0xFF;

// RGB
var colourRBG:uint = (R << 16 | G << 8 | B);

var colourARBG:uint = (A << 24 | R << 16 | G << 8 | B);

Radians & Degrees

This math always come back to me after a certain of time and take me 5 – 10 minutes to think or look around the correct one. So I write this down for myself and others for save time to look around.

radians = degrees * Math.PI / 180
degrees = radians * 180 / Math.PI

360 degrees = 2 * Math.PI (radian)

BenchMark with leaves version 2

After have some fun with the first version then I’ve update some math and fine tune some attributes to allow more leaf to be able to render. Next version expect to do something more random and closer to nature.

Benchmark 2

This version can increase the number of leaf to 60 and able to decrease down to 10. But sorry for auto repeat for increase and decrease button. I’ll add in next version if the next version is happen.

BenchMark with leaves.

This experimental in the night is so fun but right now I’m feeling so sleepy, gotta go sleep and will play more with this one later.

Benchmark Version1

The spiral shape is scaling by using “Fibonacci” number and all animation use TweenMax.

The winter has come to Bangkok!!

Winter has come in Bangkok now so let’s create a little camp fire to keep warm 🙂

You can add more fire power by using the top right slider bar but be careful the more fire power the more cpu consumption need. (but I think it is not too bad for AS3 and new flash player to handle it nowadays)

camp fire

This one write with AS3 which generate each fire element and draw each pixel to the stage real time.

I’m sorry for the source code for now, my blog still not render the code nicely, I’ll find around to set it to show the code better and will post the code of how it work again. By the way, hopefully this dump fire make you guy feel warmer in this winter. (at least from the cpu temperature that going up during run this camp fire)

Hello WWW!!

Wooo hoo!!! At last my official blog is born after postponed the site update so many time.  So now I have at blog and have nothing to say that I don’t have any space for share and note. Feel great for the start and expect to blog more from now on.

so now let’s say good bye to the under construction screen.  :~)