cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

Problem on minifyed script when removeing a ccbi node #974

Closed alenl2 closed 11 years ago

alenl2 commented 11 years ago

So i load a ccbi node like so: var aboutNode = cc.BuilderReader.load("Help.ccbi"); this.rootNode.addChild(aboutNode);

and i remove a ccbi node like so: var parent = this.rootNode.getParent(); parent.removeChild(this.rootNode, true);

and i get

Uncaught TypeError: Cannot read property 'paused' of undefined cocos2d-html5.min.js:665 cc.ActionManager.cc.Class.extend.update cocos2d-html5.min.js:665 cc.Scheduler.cc.Class.extend.update cocos2d-html5.min.js:1301 cc.Director.cc.Class.extend.drawScene cocos2d-html5.min.js:1267 cc.DisplayLinkDirector.cc.Director.extend.mainLoop cocos2d-html5.min.js:1286 window.requestAnimFrame._animationInterval.a cocos2d-html5.min.js:1362

But if i run the same code on non minifyed cocos2d-html5 or cocos2d-x js it works just fine. And allso the problem started when i started adding sounds into my game.

linshun commented 11 years ago

Which version of cocos2d-html5.min.js did you use? Is it auto generated by CocosBuilder?

alenl2 commented 11 years ago

i was building it with ant from the develop branch. but after todays update everything works fine. :)