Card Flipping Animation

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Klaus
Posts: 11872
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Card Flipping Animation

Post by Klaus » Tue Jun 30, 2020 7:03 pm

Hi Mike,

due to heavy spamming in the forum you need seven postings before you can post links and attachments.
And if you want to post your stack here, please ZIP it first.

In the meantime you could show us your script(s). :-)


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 4685
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Card Flipping Animation

Post by richmond62 » Tue Jun 30, 2020 7:19 pm

heavy spamming
Really? Me? No surely not?

Just mixing and matching to keep folk like Klaus on their toes. 8)
-
PLM.jpg
PLM.jpg (10.57 KiB) Viewed 295 times
-
In Britain 'Spam' is often called 'Pork Luncheon Meat.'
I am still trying to implement a single control that, when held down, flips through all the cards in a stack.
Why, forbye?

This is rather like the person who hires a coach-and-four to drive from Weilhem-Schongau to Munich even
though there is a regular bus service.

It is extremely inefficient and resource hungry. The effort involved to re-program (rather than attempt to import) the
functionality in a HyperCard stack is well worth it and will pay for itself in time.
-
Weilheim.jpg
Weilheim.jpg (10.39 KiB) Viewed 298 times
-
[One of my favourite Bavarian churches by the way.]
the original Hypercard stack
Despite claims LiveCode is NOT modern HyperCard, it has dumped somethings that are outmoded and, frankly, inefficient.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3038
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Card Flipping Animation

Post by mwieder » Tue Jun 30, 2020 10:40 pm

While I do understand the urge to tilt at those windmills, as Richmond says HC and LC are different beasts.
If you do get this thing working (and I have no doubt you'll manage it) you'll probably find that the action is slower in LiveCode than in HyperCard because swapping cards is inefficient in LC. Because there are better paradigms in LC than card flipping.

On the thankfully rare occasions I import HyperCard stacks it's to get at the data, not the underlying script mechanisms.

BTW - if you have imported a HyperCard stack into LiveCode, make sure you set the hcaddressing of the LC stack to false, otherwise you're still stuck in the HC world. Or sort of straddling both worlds.

jiml
Posts: 203
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: Card Flipping Animation

Post by jiml » Wed Jul 01, 2020 8:49 pm

if I held the mouse down the card flipping continued but on mouseUp it was not stopping the animation once it got going
Since you use SEND IN TIME, make sure your MOUSEUP deletes any remaining SEND messages.

Jim Lambert

Hutchboy
Posts: 7
Joined: Wed Aug 01, 2018 2:57 pm

Re: Card Flipping Animation

Post by Hutchboy » Thu Jul 02, 2020 1:43 am

Thanks Jim,

In thinking about what I've been attempting I thought "how is what I'm trying to do not basically a slide show?" So I searched on "slideshow LiveCode" and lo and behold there is a full implementation in the lesson portal..."Simple Slide Show". In that example it addresses dealing with pending messages as you suggest and works great.

I've put a pin in my original quest and will wait for that magic "Eureka!" moment if it ever comes.

Mike

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 4685
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Card Flipping Animation

Post by richmond62 » Thu Jul 02, 2020 9:28 am

Screenshot 2020-07-02 at 11.26.15.png
-

Code: Select all

on mouseUp
   put 2 into KARD
   repeat until KARD >10
      go to card KARD
      wait 15 ticks
      add 1 to KARD
   end repeat
   go to card 1
end mouseUp
Attachments
Flip Dee Doo.livecode.zip
Here's the stack.
(144.17 KiB) Downloaded 13 times

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”