Zampano

Call function on Button Mouseover

Recommended Posts

Hey there!
I'm extending the button class right now and I was wondering if it is possible to call a custom function when the mouse hovers over the button, since it already does the checking to change the pointer. 

MyButton.prototype._pointerOverHandler = function() {
	console.log("check");
};

This doesn't do the trick, I guess because _pointerOverHandler is a protected internal function.

If there is no better way then to check for mouseover myself in the buttons update cycle, then so be it, just tell me - I just want to make sure I don't miss anything. :)

Any help is greatly appreciated! Thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.