Author Topic: Right click and mouse wheel input for flixel?  (Read 2818 times)

hima

  • Member
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • My Dev Blog
Hello all!
I'm remaking a puzzle I used to make in ruby. However, the game heavily relies on mouse, using both two mouse buttons and the wheel. From the document, I only find the way to check the left mouse button. How can I check the mouse wheel and the right mouse button?

Thank you in advance :)

Vexhel

  • Member
  • **
  • Posts: 30
  • Karma: +0/-0
  • Huh?
    • View Profile
Re: Right click and mouse wheel input for flixel?
« Reply #1 on: Thu, Oct 1, 2009 »
I'm pretty sure that you can't get right click input in flash, while you can get the mouse wheel input with the MouseEvent.MOUSE_WHEEL

hima

  • Member
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • My Dev Blog
Re: Right click and mouse wheel input for flixel?
« Reply #2 on: Thu, Oct 1, 2009 »
You're right. I totally forgot about the right click thing X(  Thank you for the mousewheel! I'll look into that :)  Maybe I can change the mouse right to mousewheel down instead.

RobotCaleb

  • Guest
Re: Right click and mouse wheel input for flixel?
« Reply #3 on: Thu, Oct 1, 2009 »
You could also change it to Shift + Mouse or something similar.

Titch

  • Contributor
  • ****
  • Posts: 270
  • Karma: +0/-0
  • Thing with the guy in the place.
    • View Profile
Re: Right click and mouse wheel input for flixel?
« Reply #4 on: Thu, Oct 1, 2009 »
I think in Flash 9 and above there IS a way of capturing right click using JavaScript.

http://www.uza.lt/blog/2007/08/solved-right-click-in-as3/

It should be really easy to port that to Flixel. I think the big problem is if you where planning to distro to a bunch of portals because the Java is an external file and most portals like thing to be nice and contained. Plus it doesn't work on all browsers.
Free cake whippings every day at #flixel on irc.freenode.net.

vonWolfehaus

  • Active Member
  • ***
  • Posts: 247
  • Karma: +0/-0
    • View Profile
    • Cold Constructs
Re: Right click and mouse wheel input for flixel?
« Reply #5 on: Thu, Oct 1, 2009 »
Couple things:

1) Flash's mousewheel support doesn't really work without some javascript on the Mac. Since Macs don't have games, Mac users probably play a lot of Flash games to make up for it so this is important =p
2) Java is not javascript. Very, very different platforms and languages and everything.

But Titch is right, you can't serve your Flash game with javascript across any portals because they usually ask for a single SWF file, and you can't embed js files in SWFs (last time I checked anyway...).
Meet Obama every day at #flixel on irc.freenode.net.
Use your favorite IRC client or  http://webchat.freenode.net/

Titch

  • Contributor
  • ****
  • Posts: 270
  • Karma: +0/-0
  • Thing with the guy in the place.
    • View Profile
Re: Right click and mouse wheel input for flixel?
« Reply #6 on: Fri, Oct 2, 2009 »
My bad, I wrote that post when I was feeling pretty tired. Contrary to my apparent idiocy I do know the difference between Java and JavaScript >_>.

Anyway, don't let it put you off entirely. If a game is good enough then portal will still make arrangements for you, normally.
Free cake whippings every day at #flixel on irc.freenode.net.

decl

  • Member
  • **
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Right click and mouse wheel input for flixel?
« Reply #7 on: Fri, Oct 2, 2009 »
Well most mac user don't have a right mouse button anyway ;D

Titch

  • Contributor
  • ****
  • Posts: 270
  • Karma: +0/-0
  • Thing with the guy in the place.
    • View Profile
Re: Right click and mouse wheel input for flixel?
« Reply #8 on: Fri, Oct 2, 2009 »
Most Mac users didn't buy their computers to play video games :P
Free cake whippings every day at #flixel on irc.freenode.net.

hima

  • Member
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • My Dev Blog
Re: Right click and mouse wheel input for flixel?
« Reply #9 on: Fri, Oct 2, 2009 »
Wow thanks a lot guys! I'm still new to flash game dev scene so all those info are really valuable :D

I think the best way is to stick with one mouse button and let all turn right click and mouse wheel to buttons for players to click instead. I believe not all people have mouse wheel too, even though it's pretty normal nowadays.