if(%1 != dragging,
copy(drag_currentx, x);
copy(drag_currenty, y);
copy(drag_stagex, mouse.stagex);
copy(drag_stagey, mouse.stagey);
set(drag_sx, +1);
set(drag_sy, +1);
if(align == righttop, set(drag_sx,-1); );
if(align == right, set(drag_sx,-1); );
if(align == rightbottom, set(drag_sx,-1); set(drag_sy,-1); );
if(align == bottom, set(drag_sy,-1); );
if(align == leftbottom, set(drag_sy,-1); );
draglayer(dragging);
,
if(pressed,
sub(dx, mouse.stagex, drag_stagex);
sub(dy, mouse.stagey, drag_stagey);
mul(dx, drag_sx);
mul(dy, drag_sy);
add(x, drag_currentx, dx);
add(y, drag_currenty, dy);
delayedcall(0, draglayer(dragging) );
);
);
if(%1 != dragging,
copy(drag_currenty, y);
copy(drag_stagey, mouse.stagey);
draglayer_text(dragging,%2);
,
if(pressed,
sub(dy, mouse.stagey, drag_stagey);
add(y1, drag_currenty, dy);
add(y2, y1, pixelheight);
sub(y2, %2);
if(y1 GT 0, set(y1,0));
if(y2 LT 0, sub(y1,y2));
copy(y,y1);
delayedcall(0, draglayer_text(dragging,%2) );
);
);
border="false" background="false"
css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:14px;"
html="Textbox"
/>
border="false" background="false"
css="text-align:left; color:#000000; font-family:Arial; font-size:15px;"
html="data:testtext"
ondown="draglayer_text(start,260);"
/>