Hi,
i am playing/learning to use the plugin interface a bit more/better. (with all the setter and getter stuff etc.
Until now i mostly used it for some plain js and transfer scripts.
I particularly have one issue now and that is to make the 'drag layer' action work and/or rewrite in js.
original xml action:
Code
<action name="dragpoly">
copy(drag_currentx, x);
copy(drag_currenty, y);
copy(drag_stagex, mouse.stagex);
copy(drag_stagey, mouse.stagey);
indexoftxt(align_contains_right, get(align), 'right');
indexoftxt(align_contains_bottom, get(align), 'bottom');
calc(drag_align_x, align_contains_right GE 0 ? -1 : +1);
calc(drag_align_y, align_contains_bottom GE 0 ? -1 : +1);
asyncloop(pressed,
calc(x, drag_currentx + (mouse.stagex - drag_stagex)*drag_align_x);
calc(y, drag_currenty + (mouse.stagey - drag_stagey)*drag_align_y);
screentosphere(x, y, athh, atvv);
trace(get(athh));
updatescreen ();
);
</action>
Alles anzeigen
i tried a lot but i can't get it to work.
What am i missing?
I think my biggest problem is in the asyncloop part.. not sure though..
I'll try to prepare an example.
Tuur