Transition not working

Any idea how I can fix this?

-- Button Pressed function buttonPressed() timer.performWithDelay( 1000, createButtons ) shader3 = display.newRect(HW, 250, W, H/9) shader3:setFillColor( 0.4, 0.4, 0.4 ) transition.fadeIn( shader3, { time=2000 } ) end

In your transition isn’t correct. Its supposed to be.

function buttonPressed() timer.performWithDelay( 1000, createButtons, 1 ) shader3 = display.newRect(HW, 250, W, H/9) shader3:setFillColor( 0.4, 0.4, 0.4 ) shader3.alpha = 0 transition.to( shader3, { time=2000, alpha = 1 } ) end

If i got something wrong sorry. Im not home and using a friends mac which is so difficult after using windows your whole life!

–SonicX278

If you want to use transition.fadeIn(), I think you still need to set the object’s Alpha to 0 first. I’ve asked to get the documentation updated to make note of this.

Rob

In your transition isn’t correct. Its supposed to be.

function buttonPressed() timer.performWithDelay( 1000, createButtons, 1 ) shader3 = display.newRect(HW, 250, W, H/9) shader3:setFillColor( 0.4, 0.4, 0.4 ) shader3.alpha = 0 transition.to( shader3, { time=2000, alpha = 1 } ) end

If i got something wrong sorry. Im not home and using a friends mac which is so difficult after using windows your whole life!

–SonicX278

If you want to use transition.fadeIn(), I think you still need to set the object’s Alpha to 0 first. I’ve asked to get the documentation updated to make note of this.

Rob