I’ve been testing a test I made consisting of:
1 - Show a message at the beginning when the variable is false ball_contador. (at first).
2 - Show the message at the end when the variable changes to false.
The problem is that I can not change the variable to false ball_ruta function.
If it’s any help, I want to achieve is to run the message indicating when the ball end of the tour.
I do not know if I expressed myself well.
Thank you very much for your help in advance
Here’s the code:
[code]
local ball = display.newImageRect( “ball.png”, 50, 50 )
local ball_contador = false
ball.x = 240; ball.y = 188
local function ballruta()
ballrutaprimera = transition.to( ball, { time=7000, y=500})
local ball_contador = true
end
if (ball_contador == true) then
alerta = native.showAlert(“Mensaje”, “True”, {“OK”}, onClick)
else
alerta = native.showAlert(“Mensaje”, “False”, {“OK”}, onClick)
end
ballruta()
[code] [import]uid: 98258 topic_id: 31948 reply_id: 331948[/import]
