Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Bound sprite not working


Recommended Posts

Hi guys, 

Just trying out phaser. So far so good but I couldn't for the life of me figure out what went wrong when I'm trying to create a slider bar (vertical slider bar). 

I'm following this example: http://phaser.io/examples/v2/input/bounds-sprite

But for some reason, my sprite is not bound. 

The code:

sliderBarLeft = game.add.sprite(0,0, 'buttons', 'sliderBase.png'); 

sliderLeft = game.add.sprite(0,0,'buttons','sliderBtn.png); 

sliderLeft.alignIn(sliderBarLeft, Phaser.TOP_CENTER,0,0); 

sliderLeft.inputEnabled = true; 



sliderLeft.input.BoundsSprite = sliderBarLeft;

Any help would be much appreciated. 

Link to comment
Share on other sites


  • Recently Browsing   0 members

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