Author Topic: Detecting clicks on a FlxSprite or FlxGroup  (Read 1559 times)

IQAndreas

  • Member
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
    • IQAndreas.com
Detecting clicks on a FlxSprite or FlxGroup
« on: Thu, Dec 15, 2011 »
Is there any "Flixely" way to handle clicks and hovers on Flixel display objects, or do I just add a "plain old" Flash event listener?

Since I'm assuming all FlxSprites are bittled onto one single screen, I'm assuming there is some sort of process.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Detecting clicks on a FlxSprite or FlxGroup
« Reply #1 on: Fri, Dec 16, 2011 »
The FlxExtendedSprite classes in my power tools will provide mouse clicks for FlxSprites, and lots more. So you could rip out the parts you need maybe.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

IQAndreas

  • Member
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
    • IQAndreas.com
Re: Detecting clicks on a FlxSprite or FlxGroup
« Reply #2 on: Fri, Dec 16, 2011 »
Thanks, just what I needed!

While we are on the topic of the Flixel Power Tools, do you think you could generate the ASDoc and either include it in the repository, or perhaps throw it up on a server somewhere? I really like the way you have set up the test suite to show off the features of the library, but sometimes I need to double check function parameters or other details when I don't have the IDE open.