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 🙂

Canvas element is unsupported in your web browser

Published on May 28, 2015 at 6:00 by

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.