problem with an animation

hi,

i have a problem with this function : my object doesn’t disappear sometimes. a little point stay sometimes.

Do you have a solution for me ?   thanks :slight_smile:

local isnuage = true local function nuageAppears() if flagCircleOnTransitionOnLife and isnuage then     isnuage = false     local function removeNuage1()     oRemove(nuage1)     nuage1 =nil     end     local nuage1 = display.newImageRect(myGroupnuage, "nuage.png", 25, 25)     nuage1:translate(CircleonTransition.x,CircleonTransition.y)     nuage1.xScale = 1     nuage1.yScale = 1     transition.to(nuage1, { tag="movenuage1", time=450, x=CircleonTransition.x+5, y=CircleonTransition.y+5, yScale = 0.01, xScale = 0.01, onComplete=removeNuage1})        local nuage2 = display.newImageRect(myGroupnuage, "nuage.png", 25, 25)     nuage2:translate(CircleonTransition.x,CircleonTransition.y)     nuage2.xScale = 1     nuage2.yScale = 1     local function removeNuage2()     oRemove(nuage2)     nuage2 =nil     end     transition.to(nuage2, { tag="movenuage1", time=450, x=CircleonTransition.x-2, y=CircleonTransition.y+5, yScale = 0.01, xScale = 0.01, onComplete=removeNuage2})       local nuage3 = display.newImageRect(myGroupnuage, "nuage.png", 25, 25)     nuage3:translate(CircleonTransition.x,CircleonTransition.y)     nuage3.xScale = 1     nuage3.yScale = 1     local function removeNuage3()     oRemove(nuage3)     nuage3 =nil     end     transition.to(nuage3, { tag="movenuage1", time=450, x=CircleonTransition.x-5, y=CircleonTransition.y-5, yScale = 0.01, xScale = 0.01, onComplete=removeNuage3})       local nuage4 = display.newImageRect(myGroupnuage, "nuage.png", 25, 25)     nuage4:translate(CircleonTransition.x,CircleonTransition.y)     nuage4.xScale = 1.2     nuage4.yScale = 1.2     local function removeNuage4()     oRemove(nuage4)     nuage4 =nil     isnuage = true     end     transition.to(nuage4, { tag="movenuage1", time=500, x=CircleonTransition.x-5, y=CircleonTransition.y+6, yScale = 0.01, xScale = 0.01, onComplete=removeNuage4})       end     end

nuageAppears()

i forgot to say that

oRemove = display.remove :stuck_out_tongue:

No one ? I dońt understand why there is still a point because my function is logic and i doń’t must have this point …a rest of my animation.

Which nuage objects are not completely disappearing?

Do you call transition.cancel() without any parameters anywhere in your code? If you do then it will stop all active transitions and the onComplete functions will not occur.

yes thanks,  i’m stupid  B) 

i forgot to say that

oRemove = display.remove :stuck_out_tongue:

No one ? I dońt understand why there is still a point because my function is logic and i doń’t must have this point …a rest of my animation.

Which nuage objects are not completely disappearing?

Do you call transition.cancel() without any parameters anywhere in your code? If you do then it will stop all active transitions and the onComplete functions will not occur.

yes thanks,  i’m stupid  B)