Uh dude there isn't an obj.hitmask. If you read the entire page on this subject INCLUDING the code example at the bottom you will see that you have to defing it using the other functions they give you somewhere in the middle. Apart from that nothing looks wrong so you could just copy and paste the functions in as well as the other section of code.