Slightly modified cocos2d example. Not works yet.