Change Position of many images

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
oneup
Posts: 5
Joined: Thu Jun 11, 2015 10:13 am

Change Position of many images

Post by oneup » Mon Jun 15, 2015 1:23 pm

Hi,

I have 52 Images and i need to adjust their position on my Card.
All of them need to be on the same position but i dont want to change position of every single one of them by hand.
Is there a way of copying the propeties of one and use them for all of the other images?

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

Re: Change Position of many images

Post by LCNeil » Mon Jun 15, 2015 1:30 pm

Hi OneUp

Something like the following should work-

Code: Select all

on mouseUp
   put the loc of image "test" into tLoc
   repeat with x = 1 to the number of images of this card
      set the loc of image x to tLoc
   end repeat
end mouseUp
Make sure to change image "test" to the name of the image that is in the location that you want all other images to be

Kind Regards,

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

oneup
Posts: 5
Joined: Thu Jun 11, 2015 10:13 am

Re: Change Position of many images

Post by oneup » Mon Jun 15, 2015 1:35 pm

Hey it worked great thanks

Post Reply