Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
How to call ccbRegisterOnFrameEvent(onFrameDrawing) inside onAnimate. |
||||
|
Got it drawn. But suppose I am drawing a circle using ccbRegisterOnFrameEvent. Once I don't need it anymore, how do I remove that circle or how do I stop drawing it? Calling ccbUnregisterOnFrameEvent is not removing that circle! |
||||
|
What platform are you using? If unregistering doesn't work (which it should, but as workaround:), you can store a variable and set it to 'true' and 'false' if you should draw a circle. It it is set to false, just don't draw it. That would definately work, independent of the unregister function works or not. |
||||
|
here is the drawing code, calling from inside onMouseEvent
It is windows 7. Exporting as a exe. |
||||
|
Ah, I think the problem is that your function is inside that function. You are always unregistering a different function. Move the function and the down to outside the onMouseEvent, then is should work. |
||||
|
Ok, got it, down was not needed, just called it directly. Thank you. |
|