Strange issue after upgrading to Graphics 2.0

Hello

This part of code worked perfectly using graphics 1.0, but when I updated my simulator, turned on compatibilityV1 mode and put sprite.lua file in main folder, it just stopped working properly:

function energija1AnimFunkc()     oruzje1OK = 0     sprite.add(energija1Set, "energija1Anim", 1, 34, 400, 1)     energija1Anim.sprite = energija1OK     energija1Anim:addEventListener("sprite", energija1Anim)     energija1Anim:prepare("energija1Anim")     energija1Anim:play() end function energija1OK(self, event)     if event.phase == "end" then         oruzje1OK = 1         energija1Anim:removeEventListener("sprite", energija1Anim)     end end

I don’t know where’s the error. I can see that when animation reaches its end, it doesn’t stop and just continue loading from beginning  constantly.

I dont understand why it won’t work even I put sprite.lua file next to main.lua file. I repeat, this worked perfectly before updating Corona Graphics to 2.0.

Can you help?