playback speed

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
luc
Posts: 5
Joined: Mon Nov 05, 2007 11:19 pm

playback speed

Post by luc » Mon Nov 19, 2007 12:14 am

my project saves just fine and the stand alone plays great on my own computer. however, when i distribute it over the internet and go to a different comupter to run it the speed is way to fast.

my character's lips go very, very fast. much faster than on my own computer. i went back and added extra cards too slow down the speech animation. on my computer it does slow down but when i play it on the internet it s too fast again.

any ideas ?

n.allan
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 153
Joined: Mon Mar 12, 2007 12:06 pm

Post by n.allan » Mon Nov 19, 2007 10:07 am

What are you using to time between each frame of your animation? If it were me I would use a global constant such as milliseconds or ticks, thus when you play back on any machine, the time between the frames will be the same.

to play 30 frames you could use:

repeat with tCount = 1 to 30
--show frame tCount or whatever
wait 10 ticks with messages
next repeat

be sure to use the with messages or runrev will seize control of the app until the lopp has finnished.

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

Post by Mark » Mon Nov 19, 2007 10:11 am

Luc,

I assume you have a simple repeat loop to play the animation. Try this instead:

Code: Select all

on goNextCard
  go next cd
  if number of this cd < the number of cards then
    send "goNextCard" to me in 83 millisecs
  end if
end goNextCard
To start the animation, you can use a button:

Code: Select all

on mouseUp
  goNextCard
end mouseUp
Best,

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