Consecutive onRelease/onPress bug

Here's an old issue that suddenly stumped me today. I have a button that acts as navigation and tends to be clicked consecutively in order to advance from screen to screen. The action would only register the first time unless the mouse was moved. Since I had such a hard time finding a solution online I thought that I would add mine to the few I found.

btn.onRelease = function()
{
this._focusrect = false;
Selection.setFocus(this);
}


Feel free to add your two cents, I would love to see other solutions.

Labels: , ,

Why defensive programming is important

The situation:
A flash movie that uses the ExternalInterface to receive data from the LMS through JavaScript.
Receiving the data just fine.

The issue:
The movie freezes as soon as the data is received.

The solution:
When the course initially launches the lesson_location is undefined. Apparently Flash freaks out when setting a variable to an undefined value through the ExternalInterface, so its as simple as setting the lesson_location to 0 in the JavaScript if it is undefined.

Labels: , , ,

News coverage from AjaxWorld East

The news is out from AjaxWorld East and my free slideshow and code samples from the event are featured. Check it out and take the freebies.

Labels: , ,