Jump to content

Search the Community

Showing results for tags 'onDrag'.

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

  1. My problem is the same as the post at http://www.html5gamedevs.com/topic/2660-bring-sprite-to-front-over-all-other-groups/ , which states... The solution presented was This solution is exactly what I am looking for, however, when I try to implement it, the second drag (which moves the child from a small parent onto a group above) makes the child fly to a weird place. I've tried putting it back under the mouse by explicitly using position.x/.y, but that seems to fail. Any ideas on how I can correct this?
  2. I have a sprite that gets created by an on click on a text object, how do I make that sprite draggable with out a second click function startList(selected) { var posx = game.input.mousePointer.x; var posy = game.input.mousePointer.y; console.log(posx); if (canc > 0) { console.log('too many'); } else { canc++; tgf = tta.indexOf(selected.text); tpa = ta[tgf]; game.world.remove(selected); var cad = game.add.sprite(posx, posy, tpa); cad.scale.setTo(0.0); var sm = game.add.tween(cad.scale).to({ x: 0.96, y: 0.96 }, 200); sm.start(); //tape mechanics game.physics.startSystem(Phaser.Physics.ARCADE); game.physics.arcade.enable(cad); cad.inputEnabled = true; cad.input.enableDrag(); cad.events.onDragStart.add(startDrag, this); cad.events.onDragStop.add(stopDrag, this); cad.anchor.setTo(0.5, 0.5); }
×
×
  • Create New...