It’s not a Flash bug, it’s a bug in your code.
You need to detect when the mouse moves outside of the swf, and consider it a release, and do the proper action. You know that 90% of developers don’t take this into consideration? You can see this bug on a lot of Google Flash components as well.
Send me an email so I can give you a link to a free file done properly, and you can take the code from there. What we’ve done at Vuzum is create handlers for all states, and we add an event handler to any movieclip we want to have actions on, like this: mcName.addEvents(pathToWhereTheFunctionsAreDefinedUsuallyThis);
And then write the functions definitions, like: http://pastie.org/1708931
Ignore the switches and only see the functions and their parameters. It’s a copy/paste from whatever project I have opened right now.
And the prototype function looks like this: http://pastie.org/1708935Basically those are the events you need to check for all possible states. I think this is the most up to date file, if not shoot me an email and I’ll send the link I mentioned initially. Good luck!
The “bug” is not in the stopDrag() .. in fact stopDrag() is never even called when you release outside the stage because the mouse up event does not fire. (you can see the ball is still dragging when you bring the mouse back on stage without clicking another mouse down )
The solution is you need to define the startDrag with a bounding rectangle : eg.
ball.startDrag(true, new Rectangle(0,0,stage.stageWidth, stage.stageHeight));
and then call stopDrag when you detect the mouse coming back on the stage
That will have the desired effect
(if you really must use startDrag / stopDrag)