While I can not understand what the appointment line at onStop, probably it is necessary to consider once again animate.nut))
Check my code can you find something important:local buster = fe.add_image("busterCarrot.png", 180, 140, 52, 130 );
local buster_config = {
when = Transition.StartLayout,
width = 42,
height = 56,
loop = false,
frame = 0,
order =[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],
time = 9000
}
local busterm_config = {
when = Transition.StartLayout,
property = "position",
loop = false,
end = {x = 180, y = 140},
time = 9000
}
local busterrun_config = {
when = Transition.StartLayout,
width = 42,
height = 56,
loop = false,
delay = 9000,
frame = 0,
order = [3,4,5,6,7,8,3,4,5,6,7,8],
time = 578
}
local busterrunm_config = {
when = Transition.StartLayout,
property = "x",
delay = 9000,
loop = false,
start = 180,
end = -70,
time = 578
}
animation.add( SpriteAnimation( buster, buster_config ) );
animation.add( PropertyAnimation( buster, busterm_config ) );
animation.add( SpriteAnimation( buster, busterrun_config ) );
animation.add( PropertyAnimation( buster, busterrunm_config ) );
//Anything above this is the first two animations, that is, the character stands still 9000 milliseconds (or whatever), at the end of 9000 milliseconds, it runs off the screen.
local buster2 = fe.add_image("busterCarrot.png", -70, 167, 52, 130 );
local buster2_config = {
when = Transition.StartLayout,
width = 42,
height = 56,
loop = true,
frame = 0,
order = [9,10,11,12,9,10,11,12,9,10,11,12],
time = 490
}
local busterm2_config = {
when = Transition.StartLayout,
property = "x",
loop = true,
delay = 9350,
start = -70,
end = 860,
time = 4890
}
animation.add( SpriteAnimation( buster2, buster2_config ) );
animation.add( PropertyAnimation( buster2, busterm2_config ) );
//Here runs the third animation, it has to go in loop, but because of the delay animation appears through 9350 milliseconds instead of 450 milliseconds.