2D Toolkit Forum
2D Toolkit => Support => Topic started by: roc_hgh on March 21, 2013, 05:33:22 am
-
Hi,
If i want to listen mouseEvent,
in as3, use like this: sprite.addEventListener(MouseEvent.Click, onClick);
Now, I have a tk2dSprite or a tk2dAnimatedSprite. How should I listen the MouseClickEvent or MouseOverEvent on it?
-
You can use OnMouseEnter (http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnMouseEnter.html) but you need to make sure you have a collider on your sprite / animated sprite.