How to images Sprites (without actual sheets)

Hello everyone!!

Quick question,

I have 5 images (separate not sheets), and they correspond to form an animation of a rabbit eating a carrot, does anyone know how I can transition these every .5 seconds(ish)?

–Thanks in Advance-- [import]uid: 86879 topic_id: 16432 reply_id: 316432[/import]

You can use movie clip.newAnim() to create an animated sprite from a table of images

local myAnim = movieclip.newAnim({ “img1.png”, “img2.png”, “img3.png”, “img4.png” })
myAnim:play()
Check out the details in the API

http://developer.anscamobile.com/reference/index/movieclipnewanim
[import]uid: 26397 topic_id: 16432 reply_id: 61382[/import]

Thanks for your quick reply!! Unfortunately this didn’t whorl for me. Do I need to require somthing? [import]uid: 86879 topic_id: 16432 reply_id: 61477[/import]

@Swello,
yes you need:
local movieclip = require( “movieclip” ) [import]uid: 58922 topic_id: 16432 reply_id: 61484[/import]

Unfortunally, I am still getting this message>>>

p.s Thanks so Much for your help!!

Copyright © 2009-2011 A n s c a , I n c .
Version: 2.0.0
Build: 2011.591
The file sandbox for this project is located at the following folder:
(/Users/Kurt/Library/Application Support/Corona Simulator/Crazy Putt-CBE76DEA36949BA4E154106AB1551BFB)
Runtime error
/Users/Kurt/Desktop/Crazy Putt/main.lua:12: module ‘movieclip’ not found:resource (movieclip.lu) does not exist in archive
no field package.preload[‘movieclip’]
no file ‘/Users/Kurt/Desktop/Crazy Putt/movieclip.lua’
no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/movieclip.lua’
no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/movieclip.blu’
stack traceback:
[C]: ?
[C]: in function ‘require’
/Users/Kurt/Desktop/Crazy Putt/main.lua:12: in main chunk
Runtime error: /Users/Kurt/Desktop/Crazy Putt/main.lua:12: module ‘movieclip’ not found:resource (movieclip.lu) does not exist in archive
no field package.preload[‘movieclip’]
no file ‘/Users/Kurt/Desktop/Crazy Putt/movieclip.lua’
no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/movieclip.lua’
no file ‘/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/movieclip.blu’
stack traceback:
[C]: ?
[C]: in function ‘require’
/Users/Kurt/Desktop/Crazy Putt/main.lua:12: in main chunk [import]uid: 86879 topic_id: 16432 reply_id: 61497[/import]

l [import]uid: 86879 topic_id: 16432 reply_id: 61496[/import]

You also need to copy movieclip.lua into your projects directory.

You can acquire the movieclip.lua file via the sample code shipped with the corona sdk under the graphics samples section :slight_smile: [import]uid: 84637 topic_id: 16432 reply_id: 61557[/import]

Sweet, thanks Danny! PS do you know how to change the speed of the transitions? [import]uid: 86879 topic_id: 16432 reply_id: 61672[/import]