给声音添加了一个帧事件123

下面代码会报错
local MainScene = class(“MainScene”, cc.load(“mvc”).ViewBase)
MainScene.RESOURCE_FILENAME = “MainScene.csb”
function MainScene:onCreate()
printf(“resource node = %s”, tostring(self:getResourceNode()))
–cc.SimpleAudioEngine:getInstance():playMusic(“xuehua.mp3”, false)
self.root = cc.CSLoader:createNode(“MainScene.csb”):addTo(self)
local xuehua=self.root:getChildByName(“xuehua_audio”)
local tlAct = cc.CSLoader:createTimeline(“MainScene.csb”)
self.root:runAction(tlAct)
tlAct:gotoFrameAndPlay(0,185,false)
local function onFrameEvent(frame)
print("***************")
if nil == frame then
return
end
local str = frame:getEvent()
print("str:"..str)
if str == "123" then
print("11111111111")
end
end
tlAct:setFrameEventCallFunc(onFrameEvent());
end
return MainScene
报错内容:
:31: ‘setFrameEventCallFunc’ function of ActionTimeline has wrong number of arguments: 0, was expecting 1