Hey everyone I just started to play with Corona, and I’ve got a problem. I’m trying to fade in an overlay rectangle to effectively blur out the screen contents like this:
But nothing happens Even if I set alpha to 1.0, I don’t get the rectangle drawn.
If I change the _overlay:setFillColor(255, 64, 64, 0) alpha index to 255, it shows up fine, so I know that the rectangle is being drawn with the correct position and size.
try setting the fill color to (255,64,64,255), and the _overlay.alpha to 0, then doing the transition.
you’ve not set your object to alpha 0, you’ve set the fill to alpha 0, so even at the object’s full alpha it’s fill is still zero … 1 * 0 = 0 ! [import]uid: 6645 topic_id: 8606 reply_id: 30909[/import]
From my understanding of what’s happening here, when you put (255, 64, 64, 0), you actually set the fill color’s alpha to 0, not the alpha of the object _overlay itself. Try setting the alpha of the object to 0, and remove that 0 at the end of your setFillColor