I need to make a circle shrink over a specific time to a certain point. Its in a function that is called by the “enter frame” listener.
Right now the circle grows instead of shrinks and continues to grow instead of stop.
[lua]local circleScaling = false
local circleScale = 1
local function onTouch(event)
if(circleScaling==false) then circleScaling=true end
– etc
end
local function update(event)
if(circleScaling) then
circleScale = circleScale - 0.1
if(circleScale < 0.1) then
– reset for next time
circleScaling=false
circleScale=1
else
myCircle.xScale = circleScale
myCircle.yScale = circleScale
end