How to set the frame rate of a movie clip ?

Hi,

I am converting a FLA to corona.
I am exporting all the different frame of Flash to image and I use the movieclip library to import the anim into corona.

I have 3 questions :

1/ is there a way to set the frame rate of a movie clip ?

2/ if yes, if there a way to set a frame rate for each movie clip ? Some of them have 3 images, other 60 and should play at different frame rate.

3/ Would it be better to use the sprite object ?

Regards,

Frédéric [import]uid: 5578 topic_id: 5649 reply_id: 305649[/import]

I know nothing about items 1 or 2 because I don’t use the movieclip library, but I was going to suggest 3. I don’t know exactly how Corona works under the hood, but I think sprite sheets are more efficient than the movieclip library. I am currently porting a Flash game to Corona, and I’ve found it works great to export images out of Flash to use with Texture Packer in building sprite sheets. [import]uid: 12108 topic_id: 5649 reply_id: 19317[/import]

I posted a some code here: http://developer.anscamobile.com/forum/2010/11/16/movieclip-being-pain

Follow the instructions to edit movieclip.lua which will then allow you to send movie:play( fps, params ) and specify the number of frames per second the movie plays at. This assumes your build is set to 30fps.

[EDIT] Mike Hart posted a version of his movieclip.lua: http://developer.anscamobile.com/code/modified-moviecliplua [import]uid: 11393 topic_id: 5649 reply_id: 19350[/import]

I posted a modified version that let you set the speed ages ago inside the code section.
[import]uid: 5712 topic_id: 5649 reply_id: 19380[/import]

thank you very much to all. I upload all this bunch of code and make some test.

Frédéric [import]uid: 5578 topic_id: 5649 reply_id: 19385[/import]

Hi Frederic,

here is the link from the code section:

http://developer.anscamobile.com/code/modified-moviecliplua

Please be aware that this version is an older version of the movieclip module, but you can get the idea how to modify the current one to support a setSpeed method [import]uid: 5712 topic_id: 5649 reply_id: 19412[/import]

Thanks a lot, in fact, I cannot get my movie clips playing. I can load them, display them but they do not play.

Do I have to update something at every frame ?

Frédéric
[import]uid: 5578 topic_id: 5649 reply_id: 20139[/import]