Transitio.blink is not blinking

--------I have an objetc: spaceship

Code:

function setupSpaceShip( )

local options = { width = 63, height = 99, numFrames = 2, sheetContentWidth = 126, sheetContentHeight = 99 }

local spriteSheet = graphics.newImageSheet( “spriteSheetNew.png”, options  )

local sequenceData = {name = “flying”, start = 1, count = 2, time = 300, loopCount = 0}

spaceShip = display.newSprite( spriteSheet, sequenceData )

spaceShip.x = 500

spaceShip.y = 1500

spaceShip.name = “spaceShip”

spaceShip.lives = 3

scene.view:insert( spaceShip )

spaceShip:play( )

local physicsData = require( “shapedefs” ).physicsData(1.0)

physics.addBody( spaceShip, physicsData:get(“shipIdle”))

spaceShip.gravityScale = 0

spaceShip.isFixedRotation = true

end

--------and i have my transition

function damageFeedback( )

if(spaceShip.lives == 2) then

transition.blink( spaceShip, {time = 1000} )

end

–[[if (spaceShip.lives == 1) then

transition.blink( spaceShip, {time = 1000} )

end]]

end

But, when the transition is called, it doesn’t blink, it just fades out and doesn’t fade back.

What could it be?

Regards

Gian

Hi Gian,

Are you sure that your “damageFeedback()” function isn’t getting called multiple times, causing a queue of many transitions and disrupting the blink?

Brent

Hi Gian,

Are you sure that your “damageFeedback()” function isn’t getting called multiple times, causing a queue of many transitions and disrupting the blink?

Brent