It looks like you're new here. If you want to get involved, click one of these buttons!
-- Set up our images into frames to animate local frames = {} frames[1] = Bitmap.new(Texture.new("images/Smile1.png")) frames[2] = Bitmap.new(Texture.new("images/Smile2.png")) frames[3] = Bitmap.new(Texture.new("images/Smile3.png")) frames[4] = Bitmap.new(Texture.new("images/Smile4.png")) -- Create an animation with 2 images spread over a timeline of 20 frames -- First 10 frames are frame[1], the rest are frame[2] local mc1 = MovieClip.new{ {1, 10, frames[1]}, {10, 20, frames[2]}, } -- Set the location and add it to the stage mc1:setPosition(150,150) stage:addChild(mc1) -- If animation reaches frame 2, go to frame 1 -- Set looping of mc1 mc1:setGotoAction(2, 1) -- Start animating mc1 mc1:gotoAndPlay(1) -- Create a new movie clip -- First 5 frames are the first image. Next 5 frames are the second image, etc local mc2 = MovieClip.new{ {1, 5, frames[1]}, {5, 10, frames[2]}, {10, 15, frames[3]}, {15, 20, frames[4]}, } -- Set the location and add it to the stage mc2:setPosition(250,250) stage:addChild(mc2) -- Play it through once --mc2 plays once and stops at frame 4 mc2:setGotoAction(4,4) -- Start animating mc2 mc2:gotoAndPlay(1) |
Likes: Yan
Comments
Let me try again
http://BlueBilby.com/
http://BlueBilby.com/
http://BlueBilby.com/
http://BlueBilby.com/
http://appcodingeasy.com/Gideros-Mobile/Gideros-GTween-with-easing
http://BlueBilby.com/
Dislikes: Yan
Likes: BJG