Page 1 of 1
select objects and drag them around
Posted: Thu Feb 25, 2010 2:54 pm
by bn
Out of a thread which grew very long I post this as an answer to Tal.
(
http://forums.runrev.com/phpBB2/viewtop ... f=9&t=4917)
It is a stack that lets you select objects (groups with 1 button in it as it is) and you can drag them around. Shift clicking selects/deselects.
Script in the card script. This version implements the dragging part and respects the boundaries of the card (no accidental moving of objects off the card)
Should be easily adaptable to different scenarios.
regards
Bernd
Re: select objects and drag them around
Posted: Mon Mar 01, 2010 3:26 pm
by tal
Hi bn,
I succeed with solution, it is very helpful, thank you.
See you soon for the next problem lol
Re: select objects and drag them around
Posted: Mon Mar 01, 2010 5:54 pm
by jmburnod
Hi Bernd,
Very clever. Thanks
• I suggest an alert if btns have scripts or suppress the selection by mouseup with shiftKey
• I'm a little bit confuse with the make group command. At first I thinked it group the current selection ( i haven't really readed the "create/delete groups" comment

)
• Be careful, if the user change the loc of group 1 the command can create some group without the rect of stack
Jean-Marc
Re: select objects and drag them around
Posted: Mon Mar 01, 2010 7:17 pm
by bn
Merci Jean-Marc,
jmburnod wrote:• I suggest an alert if btns have scripts or suppress the selection by mouseup with shiftKey
you could put
Code: Select all
on mouseUp
if the hilite of btn "bMakeSelection" then pass mouseUp
-- rest of code here
end mouseUp
on mouseDown
if the hilite of btn "bMakeSelection" then pass mouseDown
-- rest of code here
end mouseDown
into the buttons (just delete all but the last group with the "DeleteGroups" button and put this script into the button, add your code for normal mouseUp/Down
jmburnod wrote:• I'm a little bit confuse with the make group command. At first I thinked it group the current selection
I left the "MakeGroups" / "DeleteGroups" buttons in the stack as a convenient way to change the one Button/Group that is cloned, they have zero errorchecking since they are only for development.
jmburnod wrote:• Be careful, if the user change the loc of group 1 the command can create some group without the rect of stack
Same here, just for development, no errorchecking.
regards
Bernd