I have 4 frames of an animation of stars that appear on screen in a random area. It works, accept it only shows my 4th frame
function spawnStars()
local sunbeam = movieclip.newAnim{ "images/stars1.png", "images/stars2.png", "images/stars3.png", "images/stars4.png" }
sunbeam.x = math.random(350, 430)
sunbeam.y = math.random(80, 160)
sunbeam:scale(3, 1.5)
if audioset == 1 then
audio.play( fireworkSound )
end
transition.to( sunbeam:play{startFrame=1, endFrame=4,loop=1, remove=true}, { time=1000, x=sunbeam.x + math.random(-50, 50 ),alpha=1.0 } )
end
timer.performWithDelay ( 400, spawnStars, 8 )
now if I change this line to the following, all the frames work, but it doesn’t end.
transition.to( sunbeam:play{}, { time=1000, x=sunbeam.x + math.random(-50, 50 ),alpha=1.0 } )
Any ideas on what I’m doing wrong?
Dan [import]uid: 78446 topic_id: 19441 reply_id: 319441[/import]