This article by Sketchy/Muddymole deals exactly with this:

http://www.create-games.com/article.asp?id=2260