Jump to content

Pointer Events on Sprite not Dispatched


Recommended Posts


I have been struggling to get an onInputDown event working on a sprite.

I am using phase-ce v2.9.2 (I have tried earlier versions as well with no luck) with webpack for build and within a vuejs application.

Below is code I'm using to test events on sprites but this isn't working.

class ButtonTest extends Phaser.Sprite {

  constructor(game, x, y) {

    super(game, x, y, 'objects', 'd-pad/left');

    this.inputEnabled = true;
    this.events.onInputDown.add(this.down, this);

  down() {
  update() {
    if (this.input.pointerOver()) {

export default ButtonTest;

It must have something to do with my build because I have tried similar code with a different build and it has worked.

The phaser game is only one part of a larger project so I need to continue to use vuejs.

Cheers in advanced for any help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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