I had an issue for a while with setting the cursor from sprite, only to discover that it seems a prerequisite is to first create the sprite in a layout and also that the sprite must remain in the layout and destroying it stops this action from working. It would be good to mention this in the manual as I don't think it is mentioned there.