Does MovieClip not support scaling (@2x) ?

I am just going through and adding all the @2x graphics to my game and noticed one set not changing, when I checked the code it’s using MovieClip.newAnim to load 3 images and then it’s quick to swap between them using stopAtFrame.

Should I not be using Movieclip anymore ?

Dave [import]uid: 117617 topic_id: 29140 reply_id: 329140[/import]

You can find a version that uses content scaling.

Or u can simply change two lines to get it working.

pass in a width and height parameter to newAnim function.

and change the image creation code (first line in the while loop) to this
animFrames[i] = display.newImageRect(imageTable[i], w, h);

Hope it helps. [import]uid: 163920 topic_id: 29140 reply_id: 117256[/import]

I thought display.newImage had been updated to support Retina graphics ?

Dave [import]uid: 117617 topic_id: 29140 reply_id: 117257[/import]

No. And it should not be as we need a function for image loading without content scaling. [import]uid: 163920 topic_id: 29140 reply_id: 117258[/import]

Ah well, need to go through all my code and change them over. Looks like ui.lua doesn’t support it either.

EDIT: Got rid of MovieClip and now using ImageSheets and Sprites.

Cheers,

Dave [import]uid: 117617 topic_id: 29140 reply_id: 117260[/import]

@thedavebaxter ,

Here is the complete solution you`re looking for: http://igaret.com/tutorials/using-movieclipx-with-your-corona-sdk-projects/ --> MovieClipX library by @iGaret
PS: Special Thanks for the amazing CoronaSDK developer - @iGARET.
Have fun,

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 29140 reply_id: 117277[/import]

I can’t use anything like that as all my images are different sizes.

I was using MovieClip to basically change the image displayed for a object.

Dave [import]uid: 117617 topic_id: 29140 reply_id: 117281[/import]

Oh well…sorry then,

different image sizes…humm…yes, I think it wouldn`t work so.
[import]uid: 89165 topic_id: 29140 reply_id: 117283[/import]

I’ve noticed that movieclip seems to have disappeared from the Sample Code, which is a shame. I like movieclip. Yes sprite sheets are more efficient, but I like the controls I get with movieclip. Sprites seem to require more code to do what you can do with movieclip.

I’m using this version:

-- Version: 2.01  
--   
-- Modified by Michael Hartlef, June 12th, 2010  
-- Added setSpeed method, which sets the speed of animation.  

It supports @2x and @4x type scaling. You get a lovely display object that you can work with just like any other display object. You can control the speed somewhat (don’t like how you have to do it… 0.5 means half the frame rate, 0.25 is 1/4th the frame rate, but it works).

[import]uid: 19626 topic_id: 29140 reply_id: 117312[/import]

Hey @Rob I agree about the MovieClip library as well. I like it because as you said above, it does require much less “coding” than using Spritsheets.

Well, the link I posted above has a MovieClip library modified bu the @iGARET that does work very nice. It lets you control the speed as well as use the auto-resolution for the images of the movieclip and does something else that I do not remember right now.

BTW, where can I get this library you mentioned the Author above?
PS: Hey, I got your mail and will reply to you as soon as I get that to work or try at least. THANKS ANYWAY because I really appreciate your spent time.

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 29140 reply_id: 117344[/import]

You might find it in the community code. [import]uid: 19626 topic_id: 29140 reply_id: 117346[/import]

Ok! Thanks!

Cheers, :wink: [import]uid: 89165 topic_id: 29140 reply_id: 117349[/import]