Saturday, December 19, 2009

Harajuku Lovers Fragrance receives FWA

Harajuku Lovers Fragrance receives an FWA Site of the Day award. Woot woot.

Monday, November 30, 2009

Neat AR Experiments

Been working on Augmented Reality (AR) on a few projects and it seems that a number of other people are making great experiments. Take a look at this from zero point nine:

Monday, July 20, 2009

Disc Collision - An Open Source AS3 Collision Detection System

I whipped up a distance based collision detection system, dubbed Disc Collision. A very basic model for collision detection, but also very fast in comparison to the vector based hitTest() in the Flash API.

Collisions are detected by a request-only model. The collision detection simply manages a collection of points and distances associated with each point. So you could easily put this into your a game engine and run an update call to get colliding points.

The algorithm is robust and has a few things to optimize. The collection of points is subdivided into multiple lists according to a spatial grid. To reduce the amount of work required detection. Then all of our points are sorted through a BST by distance so that we always know the largest distance to use when selecting grid sections.

Hold the red button down below to create objects to test collisions.

You can get code here:

Saturday, July 11, 2009

Invert the colors on your Mac

Just found this out, to invert the colors on your Mac hold ctrl-option-command and press 8. This is really useful if you're staring at white screens all day long your eyes will get tired really quickly.

Thursday, July 02, 2009

Motor2 Physics

I bought a new Macbook Pro and got it up and running. Funny how I've been using Mac's for a while now but never owned one myself. A computer is a computer.

I've been playing around with the Motor2 physics engine. I'm working on some games using it right now. I'll post and follow up when they're ready.

For now check out this new Flash port of the Box2D engine by Eric Catto here:

I suggest reading the code and using the original Box2D documentation:


Tuesday, June 09, 2009

AS3 Visual effects through BitmapData.getPixel()

I know lots of other people have created similar effects too. I just haven't done it myself. Here's an interesting effect you can get from the BitmapData.getPixel().

I'm creating a grid of squares to represent an image captured from the web camera and changing the size of a squares based on the corresponding color value.

If you don't have a web camera. No web cam?

Here's the code.

Thursday, April 23, 2009

How to turn off modsecurity (apache module)

I'm running fc10, Fedora 10 Linux.

Newly installed server and I'm just interested in doing some development for a web application. Modsecurity is used for implementing protocol level security, but it is not for everyone. Using it requires internet security knowledge. Four reasons not to use mod_security

Here's how to turn off modsecurity. Locate in /etc/httpd/modsecurity.d the line:

SecRuleEngine On

And for "DetectionOnly" switch this to:

SecRuleEngine DetectionOnly

And of course, restart apache once you are done:

# service httpd restart

It is recommended to run modsecurity in detection only until you are comfortable with writing rule sets.

Monday, March 30, 2009

Updating Samba on Fedora 8 (fc8)

I had some trouble finding this hopefully this will help other people find it easier. We have a backup server running Fedora 8. I brought the box back online with a raid 5 and got ready to install samba but ran into some errors.

In order to fix a error while installing samba:
# yum install samba-common samba samba-swat
Error: Missing Dependency: samba-common = 3.0.26a-6.fc8 is needed by package samba

I found an update for yum:
# yum install yum-fastestmirror yum-skip-broken

Then we can install samba:
# yum update
# yum install samba-common samba samba-swat

Remember to open up the firewall:
# system-config-firewall-tui

Monday, March 09, 2009

AS3 Dynamic Text Wrapping or Flowing Around Objects

EDIT: Take a look here if you are able to use Flash Player 10. (

The Flash community is still waiting for Adobe to implement dynamic or intelligent text wrapping into Flash. So meanwhile several programmers are creating their own solutions and work arounds.

After thinking about the problem, I did a quick search and I found that actually had released a solution very similar to my own inital approach. So I took a look at their code and made some improves upon based off of their original dynamic text wrapping utility.

The improvements allow text to flow around multiple objects on the left and the right. It still utilizes BitmapData and transparent pixels around each slice, but simply manages a linked list of TextFormats to control the leftMargin. In addition, it will also accept a flash.geom.Rectangle as a bounding box to work in; the motivation for this function is to reduce the computational load.

Simply input a list of DisplayObjects for the $leftList and the $rightList. Here's the function prototype:
public static function bound($field:TextField, $leftList:Array, $rightList:Array, $wrapArea:Rectangle=null, $padding:Number=10):void;

To utilize it you would make an example call:

Where tf is the TextField which wraps around objects on its left o3 and o4 and warps around objects on its right o1 and o2.

Here is the code.

Of course, it's not perfect, but it's a starting point.

Wednesday, February 25, 2009

Removing Passwords Stored in Windows XP

Windows XP gives you the ability to store user names and passwords on your local computer so you do not have to enter in your credentials each time you access different sites or resources. Of course this provides some simplicity for users that have to remember more than one user name and password. However, in terms of security, any one who sits down at your computer while you are logged on can then access sites and resources using your cached credentials.

You can view and remove the stored credentials on your computer using the following steps:

1. Click Start and select Run.
2. Type in rundll32.exe keymgr.dll, KRShowKeyMgr and Click OK.
3. The Stored User Names and Passwords dialog box will appear.
4. You can remove an entry by selecting it from the list and clicking the Remove button.
5. Click Close.

Thursday, January 15, 2009

Increasing Memory Availability In Eclipse

I often work with large projects in Eclipse so I'm frequently using all of the memory allocated to Eclipse. On MacOS X the configuration file is located here:


By default the following memory is allocated:


I've changed this to: