Hi David,
Evan, the problem is that he loses the mouse release trigger when he
accually released the button after pressing a key.
I think the solution would be to create a custom
press/release/releaseOutside functionality without using the built in
movieclip methods.
Mouse.addListener(this);
Key.addListener(this);
function onMouseDown() {
//this.hitTest(_xmouse, _ymouse);
trace('mouse down');
}
function onMouseUp() {
trace('mouse up');
}
function onKeyDown() {
trace("DOWN -> "+"\tKey: "+chr(Key.getAscii()));
}
function onKeyUp() {
trace("UP -> "+"\tKey: "+chr(Key.getAscii()));
}
I tested it, holding the mouse down and hitting a key doesn't invoke the
mouse up event. If you're extending a movieclip class then you're already
listening to mouse events so you don't need to add your object as a
listener, otherwise you will be recieving the mouse event twice. The hitTest
method ( that I commented out ) can be used to determine whether your mouse
is over a particular movieclip.
I hope this helps you out.
Good luck,
H
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders