first I am moving the sprite from a to b. when it reaches b, I need to call a function to work on the sprite, i.e fade, change image etc. I am currently doing it with a "sequence".
var seq_action = cc.Sequence.create(move_action, this.check_basket_under());
But it gives me this error -
CCActionInterval.js:507 Uncaught TypeError: Cannot read property '_timesForRepeat' of undefined
at Function.cc.sequence [as create] (CCActionInterval.js:507)
at Class.sprite_create (app.js:110)
at Class.trigger (CCScheduler.js:261)
at Class.update (CCScheduler.js:167)
at Class.update (CCScheduler.js:480)
at Class.drawScene (CCDirector.js:226)
at Class.mainLoop (CCDirector.js:884)
at callback (CCBoot.js:2160)
In Sequence, you can't directly call function. Add callFunc or callBlock
Here is c++ version example:
For more info google CallFunc, CallFuncN usage in Sequence.