I am using transition.to to move a small pointing finger across the bottom of the screen (to show users how they navigate the app).
Here is the code I use:
local tpf = display.newImage("tiny pointing finger.png",50,50) tpf.x = 300 -- set starting location tpf.y = 455 tpf.alpha = 1 local function tpfDone(event) tpf.alpha = 0 tpf:removeself() end transition.to(tpf, {time=2000, x=20, alpha=0, transition=easing.inExpo, onComplete=tpfEnd} )
The function is to move the hand slowly at first from the right side of the screen to the left, speeding up as it goes (inExpo at work). It is also going to fade the alpha from 1 to zero along the way.
The error reported on the simulator output window is as follows:
Windows simulator build date: Apr 3 2013 @ 13:54:22 Copyright (C) 2009-2013 C o r o n a L a b s I n c . Version: 2.0.0 Build: 2013.1076 waiting for connection... connected waiting for debugger initialization program started Copyright (C) 2009-2013 C o r o n a L a b s I n c . Version: 2.0.0 Build: 2013.1076 waiting for connection... connected waiting for debugger initialization program started WARNING: Attempt to set object.alpha to 1.00001 which is outside valid range. It will be clamped to the range [0,1] WARNING: Attempt to set object.alpha to -2.07261e-005 which is outside valid ran ge. It will be clamped to the range [0,1] WARNING: Attempt to set object.alpha to 1.00001 which is outside valid range. It will be clamped to the range [0,1] WARNING: Attempt to set object.alpha to -2.07261e-005 which is outside valid ran ge. It will be clamped to the range [0,1]
The warnings are that the alpha is set out of range by some exponential number. I suspect this is a problem of the inExpo function…
OK, I know it is a warning and no one but us will know it happened and Corona fixed it by clamping the number to the appropriate values. Still this is a “problem” that does not happen without the inExpo feature, so probably that is the culprit…
AND…
Corona still has not fixed the problem with the windows simulator starting TWICE (once as an android, and then restarting as an IOS device)…
Any suggestions (other than don’t do that?).
Thanks!
stu