Printing animation "frames" from the same card

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
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Printing animation "frames" from the same card

Post by erikhans08 » Sun May 10, 2015 6:17 pm

For animation, I switched from cards to moving objects around on the same single card of a one card stack.
I would like to print a series of individual "frames". Maybe creating cards on the fly, printing the cards then deleting them?
Four screens to a page would be about right. That worked well with cards.

TIA

Erik Hansen

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Printing animation "frames" from the same card

Post by Mark » Mon May 11, 2015 10:24 am

Hi Eric,

There are several ways to do this. For now, let's assume you use the printer settings to print 4 pages on 1 sheet. You can print 4 cards this way:

Code: Select all

open printing with dialog
if the result is empty then
  repeat with x = 1 to 4
    doYourAnimation x
    wait 0 millisecs with messages
    print this cd
  end repeat
end if
The wait command may be unnecessary, but I've added it to give the GUI time to redraw. I assume that the handler that does the animation is called doYourAnimation and the parameter x would allow you to do different animations depending on the number of times the script has been executed already.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply