Basically ‘startDrag’ expects 2 arguments now. Lockcenter, which is default to false. Lockcenter specifies if the object should be locked to the center of the mouse position (true) or to the point where you click the sprite (false)
After that it wants a rectangle to define it’s bounds. A rectangle is basically just an Object that looks like this;
{xmin:0, ymin:0, xmax:200, ymax:200}
Like this; var _bounds = new Rectangle(0, 0, 200, 200)
After that you just pass it to the startDrag like (false, _bounds)
I uploaded a quick example you can check out if you like
Basically ‘startDrag’ expects 2 arguments now. Lockcenter, which is default to false. Lockcenter specifies if the object should be locked to the center of the mouse position (true) or to the point where you click the sprite (false)
After that it wants a rectangle to define it’s bounds. A rectangle is basically just an Object that looks like this;
{xmin:0, ymin:0, xmax:200, ymax:200}
Like this; var _bounds = new Rectangle(0, 0, 200, 200)
After that you just pass it to the startDrag like (false, _bounds)
I uploaded a quick example you can check out if you like