-
Notifications
You must be signed in to change notification settings - Fork 818
Event MOUSE_WHEEL #1122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Thanks for posting your code, @varadig-fg! Does that help you, @Mintonist? |
I understand idea. So seems Starling has no plan to support it? I think it is more difficult, because of starling viewport, high screen resolution etc. Ok, I ask other questions:
|
@Mintonist It would definitely make sense to add it – I'll try to have a look, but it's always good to have a workaround. 😃 As for your questions:
But this code should do the trick: var mouseX:Number = mouseEvent.stageX;
var mouseY:Number = mouseEvent.stageY;
var stage = Starling.current.stage;
var viewPort = Starling.current.viewPort;
var globalX:Number = stage.stageWidth * (mouseX - viewPort.x) / viewPort.width;
var globalY:Number = stage.stageHeight * (mouseY - viewPort.y) / viewPort.height;
I hope that helps! |
I need implement scrolling logic to Starling objects. So it will be great to catch scroll mouse event to any InteractiveDisplayObject. May be helper method to convert coordinates can be a part of Starling. I find this in Feather control/Scroller.as
It is help me. And it is very similar to your code example. |
Hi!
Is it possible to add MOUSE_WHEEL event for Starling InteractiveDisplayObject?
Or how do you add this in your projects?
Thx!
The text was updated successfully, but these errors were encountered: