I have a this program, where do an animation when different frames.
local function secuencia1 (sec_puerta,num_frames)
if sec_puerta[num_frames]==0 then
return 0
else
instance1:setSequence(vector[sec_puerta[num_frames]])
instance1:play()
end
end
local function spriteListener1 (event)
print (event.phase)
if event.phase==“end” then
frames1 = frames1 +1
secuencia1 (datos_secuencia1,frames1)
end
end
instance1:addEventListener(“sprite”, spriteListener1)
The problem is that I want to change to the library “display” and not using “sprite” and not how to implement the method addEvenLister with “sprite” to see avent.phase