Jump to content

Search the Community

Showing results for tags 'game.input'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Here is the JSFiddle. I have two events. game.input.onDown which does some logic (generates particles in my example) textButton.events.onInputDown, where textButton is a Phaser.Text object instance, which does another logic.The problem is: when I click on my textButton both event are fired 1 and 2. The question is, how to prevent event 1 from firing when I click on the textButton? And why is it happen? Part of code: ... //This event is fired on click anywhere event # 1 game.input.onDown.add(particleBurst, this); //This is Clickable text textButton = game.add.text(game.world.width - 5, 5, "CLICK ME", fontStyle); textButton.anchor.setTo(1, 0); textButton.inputEnabled = true; //This event is fired on click on text event # 2 textButton.events.onInputDown.add(function () { console.log("button is Clicked"); }, this, 2); ...Any help is appreciated. How can I stop event propagation?
×
×
  • Create New...