Wednesday, September 12, 2007

double click problems

Let's say we want to set up a standard doubleClick interaction on a movie-clip(draw a square inside this clip) with instance name square:

function double(event:MouseEvent):void {

Compile, it should work fine - "doubleclick" should trace when you double click the square.

Now place a movie-clip inside square with instance name circle(draw a circle inside this clip).

Recompile. Notice that double-click isn't recognised if you double click on the circle...

For some reason the circle movieClip is preventing the double-click event from bubbling up to square. forcing 'circle' to ignore the double-click and allow the event to continue on its merry way to 'square' is the best solution i have found:;

No comments: