Jump to content

Search the Community

Showing results for tags 'detect click'.

  • 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. So I have a group, and it has three sprites. create() { var parent = game.add.group(); var allSprites = [ 'sprite1', 'sprite2', 'sprite3']; for (i=0; i<3; i++){ childImage = parent.create( game.world.centerX, game.world.centerY+ (i*30), allSprites); childImage.anchor.setTo(0.5, 1); childImage.inputEnabled = true; childImage.input.useHandCursor = true; } } How to I trigger function changeText(); when one of the child sprite is clicked. So far I have tried this method below but it only detects click on the last sprite. update(){ child.events.onInputDown.add(changeText, this); }
×
×
  • Create New...