setting carousel images in code
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
-
- VIP Livecode Opensource Backer
- Posts: 93
- Joined: Tue Nov 17, 2009 6:47 pm
- Location: Wellington, New Zealand
setting carousel images in code
Is it possible to add additional images to the carousel using a script, and/or change the image of an existing carousel control image to a new image?
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: setting carousel images in code
Hi, pthirkell. The mgProps["controls"] of a carousel contains a list in the following format;
control short id , width , height , animated (I've added spaces for readability)
The width and height data are the dimensions to display the control at when it's at the front position.
The animated flag is 0 for stationary and 1 for animated.
You can add / remove controls to / from the carousel group then ..
control short id , width , height , animated (I've added spaces for readability)
The width and height data are the dimensions to display the control at when it's at the front position.
The animated flag is 0 for stationary and 1 for animated.
You can add / remove controls to / from the carousel group then ..
Code: Select all
send "mgCarouselReset" to group "Carousel"
LiveCode Development & Training : http://splash21.com
-
- VIP Livecode Opensource Backer
- Posts: 93
- Joined: Tue Nov 17, 2009 6:47 pm
- Location: Wellington, New Zealand
Re: setting carousel images in code
Very cool thanks. I dug as far as the mgProps["controls"] ... but would never have gotten to the 'send' command to refresh.
Easy when you know how
Easy when you know how