I am getting the following warning message in the output window when I run my code:
WARNING: Attempt to set object.alpha to 1.182 which is outside valid range. It will be clamped to the range [0,1]
The line in my code that is causing this error is the following:
transition.to(text[i], {time=500, alpha=1.0})
If I change the alpha value in this line from 1.0 to something like 0.8 (based on the fact that the warning was indicating I was going only slightly above 1.0), the warning does not appear.
Additional Information
- The warning appears multiple times each time the transition is executed (20 or more warnings are generated)
- The value that appears in the warning message is often slightly different (i.e. it might be 1.182 then the following run be 1.178, etc.)
- This warning started appearing when the function that executes the transition is called by a timer.performWithDelay. The exact line with the delay is as follows:
timer.performWithDelay(15000, dataUpdate, 0)
The dataUpdate function is simple:
local function dataUpdate(e)
getData()
end
So “getData()” begins the process of executing the transition (among other things). If I call the getData() function without using timer.performWithDelay (i.e. I call it when a button is pressed), the warnings do NOT show up.
If you need anything else from me, please let me know. Thank you for your time, and keep up the excellent work on Corona!
[import]uid: 13121 topic_id: 4793 reply_id: 304793[/import]