Hi All,
I would like to get mouse coordinates i.e. xmouse & ymouse when user's click
in my flash file and I am using mouse listener for this.
The problem i encountered is as follow
I did left click on stage and got some x, y coordinates then without moving
my mouse i did right click at same place.
Now i moved my mouse to some other place in the file and did left click
there and and i got last x,y coordinates.
Which is wrong output.
Here is the code i am using in my flash file.
/************************************************************************/
// Create a mouse listener object
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
trace("mouseDown " + _level0._xmouse);
trace("mouseDown " + _level0._ymouse);
updateAfterEvent();
};
mouseListener.onMouseUp = function() {
trace("mouseUp " + _level0._xmouse);
trace("mouseUp " + _level0._ymouse);
updateAfterEvent();
};
Mouse.addListener(mouseListener);
/************************************************************************/
Please suggest me some solution to this problem.
Thanks,
Vivek
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com