Runtime:addEventListener and myTapListener(event) i didn't find the solution.

hi everybody,

since 4 days, i try to find a solution…it is for game like zelda with a top view.

my character is a blue circle who is on a red bridge ( a rectangle ).  The bridge falls but the character could escape and go out the bridge.

but my problem is how cancel the animation “characterFall” while my character is moving ? i have tried with flag, condition, hierarchy but without succes…

thanks a lot if you could help me

&nbsp;&nbsp;&nbsp; local flag = true &nbsp;&nbsp;&nbsp; local background = display.newRect(200,200,1000,1000) &nbsp;&nbsp;&nbsp; local bridge = display.newRect(200,200,200,200) &nbsp;&nbsp;&nbsp; bridge:setFillColor(1,0,0) &nbsp;&nbsp;&nbsp; bridge.xScale=1 &nbsp;&nbsp;&nbsp; bridge.yScale=1 &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; local character = display.newCircle(200,200,50) &nbsp;&nbsp;&nbsp; character:setFillColor(0,0,1) &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; transition.scaleBy(bridge, {tag="bridgefall", time=6000, yScale=-1 , xScale=-1}) &nbsp;&nbsp;&nbsp; local function myTapListener(event) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; characterEscape=transition.to(character, {time=6000, x=event.x, y=event.x})&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flag=false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; return flag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; end &nbsp;&nbsp;&nbsp; background:addEventListener("tap", myTapListener ) &nbsp;&nbsp;&nbsp; local function onEveryFrame(event) &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(bridge.xScale) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( bridge.xScale \<= 0.9 ) then &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( flag == true ) then &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fall=transition.scaleBy(character, {tag="fallCharacter", yScale=-1 , xScale=-1, time=6000})&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flag = false &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end &nbsp;&nbsp;&nbsp; end &nbsp;&nbsp;&nbsp; Runtime:addEventListener("enterFrame",onEveryFrame)

nobody ???

nobody ???