Hello.
I have a function like this
function playButton:touch( event )
– // Here I have a lot of code
end
playButton:addEventListener( “touch”, playButton )
So when I “touch” the image playButton, this function works fine.
Later in the code I have another function
function repeatMusic() function count1() print("1") end c1 = timer.performWithDelay(tempo\*1, count1) function count2() print("2") end c2 = timer.performWithDelay(tempo\*2, count2) function count3() print("3") end c3 = timer.performWithDelay(tempo\*3, count3) function count4() print("4") end c4 = timer.performWithDelay(tempo\*4, count4) function count5() print("5") playButton:touch( event ) -- \<----- HERE IS THE PROBLEM! end c5 = timer.performWithDelay(tempo\*5, count5) end repeatMusic()
And I want to “call” the playButton:touch( event ) function
but it’s not working.
How can I call that function?
do I need something different?
What am I missing?
thanks for your help
Victor