Movieclips width and height not working properly

I’ve just been playing around with Movieclips as I wanted to do a little animation however I like to use oversized images as my frames and then scale them down which if you use the variable name myAnim works fine:

[lua]local myAnim = movieclip.newAnim{“frame.png”, “frame2.png”}
myAnim.x = 300
myAnim.y = 257
myAnim.width = 72
myAnim.height = 72[/lua]

The above works however if you change the variable to anything other than myAnim then the width and height properties are forgotten and the movieclip is oversized once again.

I even used the myAnim variable inside my game and changed all references to this but as soon as an eventlistener or anything uses myAnim it looses it’s height and width again.

Not tried xScale or yScale yet to see if this changes anything but thought I’d share my findings and maybe someone has some experience in this area.

If it is a bug, can we have it fixed? Please :slight_smile:
– Chris [import]uid: 33866 topic_id: 11294 reply_id: 311294[/import]

As an update to this I’ve rewritten the movieclip.lua library so it now creates newImageRects instead of newImages and also extended the parameters of the newAnim function so it now takes an animation width and height after the frames table.

Example:

[lua]local animation = movieclip.newAnim({“frame1.png”, “frame2.png”}, 150, 150)[/lua]

This fixed all my problems, if anyone would like me to post the updated movieclip.lua library then let me know :slight_smile:

– Chris

[import]uid: 33866 topic_id: 11294 reply_id: 41027[/import]