how can i show object then after 2 seconds it will remove ?

how can i show object then after 2 seconds it will remove ?

but the object remove  fadeout…

:frowning:

Take a look at timer.performWithDelay and the transitions library.  Something like:

local obj = display.newSomethingOrOther( ... ) local function endTransition( objref ) -- fade-out is now complete -- remove the object here end local function endTimer( event ) -- start the fade-out transition.to( obj, {alpha=0, onComplete=endTransition} ) end timer.performWithDelay( 2000, endTimer )

Take a look at timer.performWithDelay and the transitions library.  Something like:

local obj = display.newSomethingOrOther( ... ) local function endTransition( objref ) -- fade-out is now complete -- remove the object here end local function endTimer( event ) -- start the fade-out transition.to( obj, {alpha=0, onComplete=endTransition} ) end timer.performWithDelay( 2000, endTimer )