dragable style with delayed call

  • Hello,

    i use dragable style for a textfield like this :

    Code
    style="dragable"
    onDragStart="trace(I started being dragged);"
    onDrag="trace(I am constantly being dragged and this is fired while dragging);"
    onDragEnd="delayedcall(5, action(reset_textfield_infos_placement););"

    i want the textfield replace itself in initial position after user stop draging it,
    but i want the delayed call canceled and reset to 0 if user drag again the textfield,
    in case a long text, user drag a little, read, drag again, read and ...

    but with my code, the 5 sec. delay occurs after the first dragEnd, not the last,
    how to setup a flag to avoid that ? *confused*

    Thanks

    Davx

    Edited 5 times, last by Davx: try to find the break line to make code more readable (November 20, 2013 at 3:03 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!