Search the Community

Showing results for tags 'callbacks'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 4 results

  1. Hey guys I'm trying to get a function to be called each time the gamepad is released. I think I need to use the function addCallbacks() and the property onUpCallback from the Gamepad class. I have Gamepad called pad1 and a function test() that should be called every time any gamepad button is released, but not really sure how callbacks work/correct syntax. Thanks for your help.
  2. Hello, i was trying to attach eventListeners to sprites. I did that in the create function : this.selectorGroup =;height = 200;// looping through json for(var key in res){ var selector = game.add.sprite(625, height - 10, "resourceSelector"); selector.inputEnabled = true; // adding some custom property = key; // attaching eventListener; // adding the sprite to a group this.selectorGroup.add(selector); height = height+40;}// setting all elems of the group to alpha 0this.selectorGroup.alpha = 0;then in the callback function : triggerSearch = function (item, pointer) { // this is working console.log("looking for ",; // hide previous selections this.selectorGroup.alpha = 0; // this isnt working item.alpha = 1;};also, i cant access the selectorGroup to apply alpha 0 to all children in order to reset previous selections. though, if i dont set alpha to 0 to sprites in create function and i put item.alpha = 0 in the callback, i can remove opacity from the sprites... Am i missing something?
  3. #1 are tilemaplocationcallbacks working in 1.2 ? # is it (will it be) possible to assign materials and collisioncallbacks to layers so i can put all my "ice" tiles in one layer (friction=0) and all my "lava" tiles in another (player.kill()) ? (or what would be the appropriate way to accomplish those things?) thank you all in advance !!
  4. Hey all I've used the Prototype pattern explained here and in various forum posts: This works if I maintain a reference to an object. For example: var player = new FooBar.Player(, x, y); I can then call the functions that I've written in the FooBar.Player class that is an extension of the Phaser.Sprite class. However, I can't access those functions if I use group callback functions: playerGroup.foreach(function(player){ player.somethingCustom(); }; => TypeError: Object [object Object] has no method 'somethingCustom' Is there a way to extend a sprite, add it to a group and maintain its classiness?