Hi,
i'm playing a bit and i have this x only dragging of a layer.
I like to make it that it only is possible to drag to the left.. so x minus value.
here is my code..
what to change to make it only possible to drag to the left?
the layer is aligned centre. x=0
Code
<action name="draglayer">
if(%1 != dragging,
copy(drag_currentx, x);
copy(drag_stagex, mouse.stagex);
set(drag_sx, +1);
draglayer(dragging);
,
if(pressed,
sub(dx, mouse.stagex, drag_stagex);
mul(dx, drag_sx);
add(x, drag_currentx, dx);
delayedcall(0, move(); draglayer(dragging) );
);
);
</action>
Alles anzeigen
i tried somethings like if(x LT 1, etc on different places .. but no success..
Anybody?
Tuur