GithubHelp home page GithubHelp logo

Comments (12)

PrimaryFeather avatar PrimaryFeather commented on June 19, 2024 1

I must say I'm no longer sure this is really necessary, since dragging can be achieved as simple as the following:

sprite.addEventListener(TouchEvent.TOUCH, onTouch);

private function onTouch(event:TouchEvent):void
{
    var target:DisplayObject = event.target as DisplayObject;
    var touch:Touch = event.getTouch(target, TouchPhase.MOVED);

    if (target && touch)
    {
        var movement:Point = touch.getMovement(this);
        target.x += movement.x;
        target.y += movement.y;
    }
}

This was more complicated in the past, when there was no getMovement() method. But now — it seems very simple; and most of the time, you need to adapt the code somehow, anyway, so the default implementation wouldn't cut it for you.

Are there more opinions on this?

from starling-framework.

illuzor avatar illuzor commented on June 19, 2024

So long time... We need this feature!

from starling-framework.

fljot avatar fljot commented on June 19, 2024

@illuzor useful troll mode why startDrag() but not startBlink()?

from starling-framework.

PrimaryFeather avatar PrimaryFeather commented on June 19, 2024

Wow, it's been a while since I opened up that issue! ;-)
Since I never got any feedback of developers requiring it, it's quite low down in my priorities-list, though I still think it would be useful.

However, I recommend you have a look at the "TouchSheet" class that's used in the Starling Demo. It implements a complete multi-touch-enabled drag solution (plus pinch and rotate), so it's for sure a good starting point for what you want to achieve.

from starling-framework.

illuzor avatar illuzor commented on June 19, 2024

PrimaryFeather, thank you for answer.
Of course task may be solved via many ways, but built-in feature will be much more comfortable.

from starling-framework.

PrimaryFeather avatar PrimaryFeather commented on June 19, 2024

Of course! I just want to avoid that you have to wait for me to implement this before you can continue. ;-)

from starling-framework.

illuzor avatar illuzor commented on June 19, 2024

I have solved the task. I am understand that implementation can`t be immediate.
We are just waiting. Thank you!

from starling-framework.

Eketol avatar Eketol commented on June 19, 2024

Still waiting :)

from starling-framework.

22Round avatar 22Round commented on June 19, 2024

+1 for waiting

from starling-framework.

illuzor avatar illuzor commented on June 19, 2024

I`m agree. No need for dragAndDrop now

from starling-framework.

Eketol avatar Eketol commented on June 19, 2024

Thanks PrimaryFeather, that worked for me!

from starling-framework.

PrimaryFeather avatar PrimaryFeather commented on June 19, 2024

Perfect, thanks for the feedback!
I'll close this issue then.

from starling-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.