Centre
I made a present like this one before in Flash published May 20 2003. I did open the file and read through the code. It is similar, but there are also differences. I’m still struggling with scope in Javascript. I set the startX and startY points before the setCanvas function was executed, so the centre wasn’t properly determined. So i put the code back into the drawPresent function, which is executed after the setCanvas function. It does calculate the centre good now. Adding a detection border wasn’t that hard.
So, we start in the centre and hobble on from there. Watch it 🙂