Animation in LiveCode
prothero at earthednet.org
Wed Jan 6 02:45:43 CET 2016
Thanks, Richmond and Mike:
So…. the frame rate of the animated gif is set when the gif is made? And, the movement of the gif is controlled by the movespeed command. Obviously, these two speeds would need to be coordinated, or the tiger might look like its slipping on wet grass, pawing the ground. I wonder if there are any gotchas if the gif animation could get out of whack with the movespeed control of the figure across the screen.
Nice animation, and you both are amazing!
> On Jan 5, 2016, at 1:01 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> Alternatively, if you want more control of the animation, you could use a
> game loop, and move the tigers around (set the loc... ) as well as manually
> choosing which frame to show when using "currentFrame"
> On Tue, Jan 5, 2016 at 1:59 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>> use "lock moves" before your moves, and add "without waiting" at the end
>> of each move command.
>> Unlock moves after you have all moves queued.
>> Also, rather than mess with setting the move speed a second time, just set
>> the loc of the images to where you want. Or even better, since they walk
>> off screen entirely, there is no reason to set them to invis, and since you
>> use "move" to tell them where to move from and to, you don't even need to
>> set the loc of them.
>> This is sufficient to the task.
>> on mouseup
>> set the moveSpeed to 50
>> lock moves
>> move img "Tiger" from -59, 240 to 698, 240 without waiting
>> move img "TigerBack" from 698, 160 to -59, 160 without waiting
>> unlock moves
>> end mouseup
More information about the use-livecode