Creating live sliding cards... possible?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Creating live sliding cards... possible?
I am trying to achieve a live sliding card effect for both directions, where from a current card using touch gestures a user can slide right or left without using the push visual effect. From the given card, the view of the previous and next cards would need to be available for a live slide either way.
Is this possible without using transitions? If so, could someone get me started?
Does this even make sense? LOL.
Many thanks!
Todd
Is this possible without using transitions? If so, could someone get me started?
Does this even make sense? LOL.
Many thanks!
Todd
Re: Creating live sliding cards... possible?
I can think of a way, but having gone up that path recently I'm not willing to subject you to the pain it involves...and no, it isn't worth it! Hopefully future updates to LC will bring graphics processing speed gains, and we'll also get better performing scroller objects. Both those thing would make my idea workable.
Gerry
PS How many cards in total?
Gerry
PS How many cards in total?
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
Re: Creating live sliding cards... possible?
Gerry:
Thanks for the reply... I started thinking about generating card snapshots on the fly and then replacing them with actual card navigated with no transition, but then my head started spinning, and... LOL...
:Todd
Thanks for the reply... I started thinking about generating card snapshots on the fly and then replacing them with actual card navigated with no transition, but then my head started spinning, and... LOL...
:Todd
-
- Posts: 18
- Joined: Wed Jul 12, 2006 4:40 am
Re: Creating live sliding cards... possible?
While not the most elegant solution, you could first detect swiping touch motions for left or right swipes on the current card. That would trigger a screenshot of the current card which would then be placed on the card the user will be going to. You immediately jump to that card (no transition) and then use a move command to move the screenshot off screen with the desired animated effect. Purge the screenshot when finished to keep things clean.
I haven't tried this, that's just what comes to mind when I think of the solution you are looking for.
I haven't tried this, that's just what comes to mind when I think of the solution you are looking for.
Re: Creating live sliding cards... possible?
Thanks. That's kind of what I've done.
After thinking about the problem, I created a native scroller that places the preceding/following cards as snapshots into position on a preOpenCard handler. The snapshots are generated fresh with each preOpenCard call as a stack script. I have a go to card script in the scrollerDidScroll handler, which replaces the snapshot with the actual card with no visible transition.
The performance is really pretty good.
Thanks for the input!
Todd
After thinking about the problem, I created a native scroller that places the preceding/following cards as snapshots into position on a preOpenCard handler. The snapshots are generated fresh with each preOpenCard call as a stack script. I have a go to card script in the scrollerDidScroll handler, which replaces the snapshot with the actual card with no visible transition.
The performance is really pretty good.
Thanks for the input!
Todd
-
- Posts: 3
- Joined: Thu Sep 06, 2012 8:46 pm
Re: Creating live sliding cards... possible?
I'm new to the forums and found this thread while poking around. Can you share code for how to make this work? I'm an experienced programmer but I have not worked with scrollers before. Also, will this technique work under iOS? TIA
Re: Creating live sliding cards... possible?
Hi,
I assume you want a visual construct like the homepage of TvShowTracker app:
http://itunes.apple.com/us/app/tv-show- ... 65283?mt=8
So, how about using groups instead of cards and a native iOS scroller control?
Check out my stack for a simple implementation:
Regards,
~ Ender Nafi Elekcioglu
I assume you want a visual construct like the homepage of TvShowTracker app:
http://itunes.apple.com/us/app/tv-show- ... 65283?mt=8
So, how about using groups instead of cards and a native iOS scroller control?
Check out my stack for a simple implementation:
Regards,
~ Ender Nafi Elekcioglu
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
-
- Posts: 125
- Joined: Sat Jan 31, 2009 12:01 am
Re: Creating live sliding cards... possible?
basically, make 1 card.
use the scroller horizontal scroller
you have to create a group with 3 fields side by side by side horizontally to the size of your card.
scroll horizontally side to side. that simulates the "card" transitioning even though your in one card.
so when the card is open, the middle field is visible. this allow you to slide right and left.
Once you slide Right lets say, then, you have to LOCK SCREEN. then put the content of the 1st field, into the 2nd field. then set the position of the scroll of the middle (2nd field) to (1025) and unlock screen.
do similar when you slide or swipe left.
I'm sure I have a stack someplace with that effect
use the scroller horizontal scroller
you have to create a group with 3 fields side by side by side horizontally to the size of your card.
scroll horizontally side to side. that simulates the "card" transitioning even though your in one card.
so when the card is open, the middle field is visible. this allow you to slide right and left.
Once you slide Right lets say, then, you have to LOCK SCREEN. then put the content of the 1st field, into the 2nd field. then set the position of the scroll of the middle (2nd field) to (1025) and unlock screen.
do similar when you slide or swipe left.
I'm sure I have a stack someplace with that effect