Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse.addListener question

Status
Not open for further replies.

shaddow

Programmer
Mar 22, 2001
1,862
RO
I'm using this simple code in Flash MX 2004
Code:
someListener = new Object();
someListener.onMouseMove = function ()
{
};
Mouse.addListener(someListener);


I was wondering if there is posible to get the object on wich the mouse moved on. Something like this
someListener = new Object();
someListener.onMouseMove = function (targetObj)
{
 trace(targetObj)
};
Mouse.addListener(someListener);
Bu there is no targetObj defined.

In html this is simple but here i cant find any example on that, unless some click events or something. but i'm nostly interested on the onMouseMove event.

________
George, M
 
you can use onClipEvent on the object instead on in the Frame.

OnClipEvent (mouseMove) {
statement goes here;
}

and if the mouse moves over the object the event is triggered.

is that want you are asking for?

check my syntax

fyi

jef
 
Yes i think this could do the trick also. I wanted to listen the mouse and then find out wich element had the action. But i think if this is not posible your solution looks ok for me.

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top