Carousel first draft (+ hints and tips)
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Carousel first draft (+ hints and tips)
The carousel custom control is a first attempt as far as MobGUI goes and I'm sure there are improvements that could be made. I was thinking that if images are dragged into the control, the fileName property could be set automatically - relative to the stack's path - allowing resolution independence to kick in and use appropriate images if they are present.
LiveCode Development & Training : http://splash21.com
Re: Carousel first draft
It's brillant. Bravo.
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Carousel first draft
Thanks - I really wasn't sure how to start creating a palette to set the thing up, but I think it's worked out OK.
Here are a couple of hints that can help; (I've caught myself out a few times when testing and thought something had gone wrong, but I had just forgot to check a couple of things)
(The control will ignore touches/mouse in this mode)
Here are a couple of hints that can help; (I've caught myself out a few times when testing and thought something had gone wrong, but I had just forgot to check a couple of things)
- If you have trouble moving the carousel when the mouse is not directly on an image : click the 'Reset' button in the palette.
- If the images suddenly jump to another position when you spin the control after editing the group, check the position of the carousel oval ("Show carousel oval" check box). It may just have been moved out of position.
Code: Select all
on mouseUp
set the mgProps["autospin"] of group "Carousel" to 25
send "mgCarouselSpin" to group "Carousel" in 0 millisecs
end mouseUp
LiveCode Development & Training : http://splash21.com
Re: Carousel first draft (+ hints and tips)
Great control! However I feel t's not quite useable. I have 7 images in a test carousel and I want the user to be able to swipe to bring them to the front in sequence. At the moment if the user swipes the control at all fast it spins rather than just bringing the next image to the front. I have to swipe quite slowly to achieve good control (pun intended).
Secondly, when I do:
on carouselFront pControlId
put pControlId
end carouselFront
...in the IDE I don't get a control ID in the message box. I get e.g. "0.064103" or "0.016393". It returns an ID only on iOS. Of course that isn't a problem, but it seemed worth noting.
Gerry
Secondly, when I do:
on carouselFront pControlId
put pControlId
end carouselFront
...in the IDE I don't get a control ID in the message box. I get e.g. "0.064103" or "0.016393". It returns an ID only on iOS. Of course that isn't a problem, but it seemed worth noting.
Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Carousel first draft (+ hints and tips)
Hi, Gerry. I posted a message to the use-list, but forgot to drop a post here : there are a couple of puts that will hog the message box;
Just noticed two stray puts in the carousel behavior script: lines 255 & 309. I'll make sure those are removed for the next update.
A mode where the control sticks as soon as it hits the next in sequence sounds like a good idea - it's now on the listJellicle wrote:I want the user to be able to swipe to bring them to the front in sequence
LiveCode Development & Training : http://splash21.com
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Carousel first draft (+ hints and tips)
I've snuck in a quick carousel update with a 'sticky' option that should hopefully allow much easier selection of items as discussed. V1.23 is ready for download.
LiveCode Development & Training : http://splash21.com