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

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

Using the transition.to API, like this:

local circ = display.newCircle(50,50,50) transition.to(circ, {alpha = 0, time = 2000})

tnx ser it helps a lot… :slight_smile:
 

A minor point … JonPM’s answer will fade out the object but doesn’t technically remove it (if I read your original question correctly).  So it is not visible but still taking up memory.

You can add an “onComplete” function to the transition options table and that function will be called when the transition is complete (i.e. the object is faded out completely) … and you can write that function so that it removes the object.  

Using the transition.to API, like this:

local circ = display.newCircle(50,50,50) transition.to(circ, {alpha = 0, time = 2000})

tnx ser it helps a lot… :slight_smile:
 

A minor point … JonPM’s answer will fade out the object but doesn’t technically remove it (if I read your original question correctly).  So it is not visible but still taking up memory.

You can add an “onComplete” function to the transition options table and that function will be called when the transition is complete (i.e. the object is faded out completely) … and you can write that function so that it removes the object.