Search the Community

Showing results for tags 'enabledrag'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 3 results

  1. how do i use the input.enableDrag(false) feature with tilemaps? it does not seem to work. It just says "Cannot read property 'enableDrag' of undefined(…)". I know the tilemap works because I am already using it somewhere else but not in the same file. Any help would be amazing!
  2. Hi, How is the correct form to enable a graphic draw? Here is my code: // create fn :; // posicion del grupo en el escenario: var _y = 0; var _G =; for(var i=0;i<20;i++){ var p = this.doSome(i); // trying to create graphics inside a group or sprite ??? if(i>0){ p.x = (50*(i%5)); p.y = _y; } if(i%5==4){ _y = _y+50; } // p.enableBody = true; // p.inputEnabled = true; // p.input.enableDrag(false, true); _G.add(p); // console.log(p); } _G.setAll('inputEnabled',true); _G.callAll('input.enableDrag','input'); // ,parameter _G.x = (*0.5) - (_G.width*0.75); _G.y = (*0.5) - (_G.height*0.75); // = rect; }, // end create doSome: function(num){ var rect =,100); rect.beginFill(0xFF3300); rect.lineStyle(3,0xFFCC33,1); rect.drawRect(-25,-25,50,50); rect.endFill(); var txt =,0,null,{align:'center'}); txt.anchor.setTo(0.5,0.5); txt.x = rect.x; txt.y = rect.y; txt.text = num+1; var gp_ =; gp_.add(rect); gp_.add(txt); = 'gpo'+num; // gp_.inputEnabled = true; // gp_.mousedown(this.clickable,this); // gp_.inputEnabled = true; // gp_.input.enableDrag(false, true); // console.log(,num); return gp_; }, Console sends and error when I am using inputEnabled, and it says p.input is undefined Need some help I'm very beginner with phaser, and don't know clearly how do nested objects work This is what I want to do: - Create a group and move all together - Inside it create two elements: graphic.drawRect, and over it create a text, - I want to drag both elements at same time, so I put them into another group!, or how is it? Well, If somebody have an idea I would be glad! thanks
  3. Hi All, I am trying develop a game that contains a color band of 5 different colored rectangles. So I created a group and added those rectangles to it(I have uploaded the image of the output). Now I am trying to write the code in such a way that the entire group will be moving horizontally once I drag it. But from what I found we can make the individual element in the group draggable but not the entire group. Anyways, I did write the code this way but I think its wrong as its not working. Here it is. var leftRectGroup =; var colorarray = ["0x607D8B", "0xFF5722", "0xFFEB3B", "0x9E9E9E", "0x795548"]; for(var i = 0; i < 5; i++){ var rectanglegraphics =,0); rectanglegraphics.beginFill(colorarray, 1); rectanglegraphics.drawRect(0, i*256, 100, 256); leftRectGroup.add(rectanglegraphics); rectanglegraphics.endFill(); } leftRectGroup.inputEnabled = true; leftRectGroup.input.enableDrag(); leftRectGroup.input.allowHorizontalDrag = false; Can anyone please provide me the right snippet to make the entire group draggable at once. Thanks in Advance.