Jump to content

Adding button to group: Cannot read property 'parent' of undefined


Recommended Posts

When I try to add a button to a group, I get the undefined error. Why does that happen?

this.create = function() {
    this.pathGroup = game.add.group();
    this.pathGroup.create(50, 200, 'bamboo');
    this.pathGroup.create(600, 170, 'bamboo');
    this.treehouse = this.make.button(280, 50, 'treehouse');
    this.treehouse.onInputUp.add(this.clickPlay, this);


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...