I have the following code...
local mc = MovieClip.new{
{1,10,highScoreTex,
{
x = {0, config.left + config.halfWidth - highScoreTex:getWidth()/2, "linear"}
}
}
}
This moves the text from the left to the center of the screen but it does it really fast.
So to slow it down i changed it to this...
local mc = MovieClip.new{
{1,50,highScoreTex,
{
x = {0, config.left + config.halfWidth - highScoreTex:getWidth()/2, "linear"}
}
}
}
But the text never makes it to the center of the screen and stops early. How would i slow down the animation but have it reach the same destination?
Comments
but how far it is till center and from which frame (adding up from 10 to 50) does it start to happen?
where are your config settings coming from? config.halfWidth, etc
secondly, is your project settings and your simulator running at the same resolution? Are you sure that your settings are not for 320x480 and running at 640x960 or vice-versa.
Lastly,
I am not sure why for setting the Y axis (Vertical) you are using left, and width, you should be using top and height.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
I just tried running both at the same resolution (480,800) but the results are the same.
I'm not changing the Y axis, I'm changing the x position of the object.
ahhh, sorry at first glance it reads like {0, left + width} so it seemed like you are manipulating the Y axis and the X is 0.
what was I thinking, you are using a movie clip...
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Because it all depends on the project settings you have