moving an image with the mouse

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
GPJMA
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 38
Joined: Sun Jan 01, 2012 11:48 pm
Location: Brisbane Autralia

moving an image with the mouse

Post by GPJMA » Thu Nov 13, 2014 1:51 pm

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

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: moving an image with the mouse

Post by LCNeil » Thu Nov 13, 2014 1:57 pm

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
--

Post Reply

Return to “Games”