how can i removed object when i used transition ?

when i used this code no transition happened…

local function onBounce ( self, event )
    if event.other.type == “bnn” then
    transition.to(bnn,{ alpha=0, xScale=0.3, yScale=0.3, time=100 },bnn:removeSelf())

    end

end

syntax of transition.to is different - check api docs

wat i supposed to do ?

check docs first :slight_smile:

http://docs.coronalabs.com/api/library/transition/to.html

function listener()

bnn:removeself()

end

local function onBounce ( self, event )

    if event.other.type == “bnn” then
    transition.to(bnn,{ alpha=0, xScale=0.3, yScale=0.3, time=100, onComplete = listener } )

    end

end

error

Where? What error?

syntax of transition.to is different - check api docs

wat i supposed to do ?

check docs first :slight_smile:

http://docs.coronalabs.com/api/library/transition/to.html

function listener()

bnn:removeself()

end

local function onBounce ( self, event )

    if event.other.type == “bnn” then
    transition.to(bnn,{ alpha=0, xScale=0.3, yScale=0.3, time=100, onComplete = listener } )

    end

end

error

Where? What error?