Page 1 of 1

moving an image with the mouse

Posted: Thu Nov 13, 2014 1:51 pm
by GPJMA
Hello All. Got "trapped" into building a live code doll house for my Granddaughters..........
I want them to be able to put furniture wherever they want using touch or the mouse.
Never tried to write a game or anything like one before.
Hope I can get a head start here.
Thank you all.
G :D

Re: moving an image with the mouse

Posted: Thu Nov 13, 2014 1:57 pm
by LCNeil
Hi GPJMA,

The easiest way to get started with this is using the "grab" command. An example of this is placing the following script in a control (e.g. button, graphic)

Code: Select all

on mouseDown
grab me
end mouseDown
This will then allow the control to be placed wherever you like during runtime :)

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--