Jump to content

Search the Community

Showing results for tags 'oninputup'.

  • 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 3 results

  1. I am using events.onInputUp.add on my Phaser.Sprite, but it is not working the way I need it to for my game. If I press down on my sprite and then release, it works, but if I press down anyplace else on the screen, rollover my sprite, and then release, the inputUp event never happens even though I am over my sprite and releasing. I need the up event to fire regardless of where the initial down event occurred. Any ideas?
  2. I have a situation where there are two sprites - sprite1 and sprite2. sprite1 is enabled for onInputDown as follows: sprite1.inputEnabled = true; sprite1.events.onInputDown.add(select, this); Then, within the select() function, there is some code to work out which sprite to display, which in this case turns out to be sprite2. Once this is done I enable sprite2 for onInputUp: sprite2 = game.add.image(game.input.mousePointer.x, game.input.mousePointer.y, "sprite2"); sprite2.inputEnabled = true; sprite2.events.onInputUp.add(deselect, this); So here, sprite2 appears under (or actually below and to the right of, but never mind) the mouse pointer while the mouse button is still down. Now, if the user lets the button go up, sprite2 should disappear when running deselect()So, if you click on sprite1 then sprite2 will briefly appear and then disappear. But it you click on sprite1 and keep holding the mouse button down then sprite2 will appear and remain there until you let the mouse button go. function deselect() { sprite2.destroy(); } BUT this is not what happens dammit. sprite2 does NOT disappear when you let the mouse button up, it just stays there. However, after this, if you then click on sprite2 and THEN let the mouse button go, it will disappear. How can I make it so that sprite2 appears when the mouse button is held down but disappears if you let it go from the first time the user triggers onInputDown?
  3. IE11 is not detecting my sprite's onInputUp events if I drag outside of the canvas and release the mouse button. It works just fine in Firefox 39 and Chrome 44. I have a sprite following the cursor position after the user clicks on it (I'm using an onInputDown event). Since the onInputUp event isn't captured off canvas, the sprite continues to follow the cursor until it is clicked on and released again, which is problematic in my game. Does anyone know if there is a fix for this? I'd prefer not to have to use some sort of game.input.mouse.mouseOutCallback hack that triggers a simulated mouse release if I don't have to (if that's even possible). Would prefer to make the IE version work just like the Firefox and Chrome versions.
×
×
  • Create New...