Archive for 'Actionscript'
HTML 5 Canvas vs Flash
Over the holidays I gave myself a break from Actionscript and took a look at the HTML 5 Canvas object. It’s been a while since I programmed any javascript, and AJAX technologies seem to be the popular choice for web apps these days (goodbye Flex!). I decided to port over an old Actionscript 1 experiment [...]
Posted: January 17th, 2010 under Actionscript, Flash, Javascript.
Comments: none
Overlapping hit areas for sibling sprites
I have a recurring problem with buttons. And when I mean buttons I mean anything that has a mouse handler and inherits from InteractiveObject, which includes Sprite and SimpleButton. The problem is when two or more of these objects are siblings (i.e. in the same container, not nested) and they overlap, then they block each [...]
Posted: December 1st, 2009 under Actionscript, Flash.
Comments: none
Modulo and the negative divisor
I never had reason to doubt the modulo operator, but it turns out it’s been hiding a little secret from me all these years: it works differently in other programming langauges. I discovered this while converting a Python program to Flash. In Python the result of the modulo operation has the same sign as the [...]
Posted: October 24th, 2009 under Actionscript.
Comments: none
Time sync for remote server
Here’s a quick little utility I used in my last project: a simple class that syncs with a time source. It can be used to ensure your application runs on server time rather than the user’s system clock. You sync once with the remote server at the start, and then Flash runs an internal timer [...]
Posted: August 11th, 2009 under Actionscript.
Comments: 1