bubamara Posted August 21, 2013 Share Posted August 21, 2013 Hi guys, when I click on "delete" button on Android device 4.1.1 using it's default browser, graphics & text aren't removed, just sprite. With latest Firefox for Android, it's ok. Also works fine on PC, IOS.Anyone else can confirm this? Here's the code : <!DOCTYPE HTML><html> <head> <script type="text/javascript" src="pixi.js"></script> </head> <body> <script> var stage = new PIXI.Stage(0x3c3c3c); var renderer = PIXI.autoDetectRenderer(320, 480); document.body.appendChild(renderer.view); var graphics = new PIXI.Graphics(); graphics.beginFill(0x808080, 1); graphics.drawRect(0,0,100,100); stage.addChild(graphics); graphics.endFill(); var text = new PIXI.Text("text", {font: "20px Arial", fill: "#ffffff"}); text.position.x = 20; text.position.y = 20; stage.addChild(text); var texture = PIXI.Texture.fromImage("bunny.png"); var bunny = new PIXI.Sprite(texture); bunny.position.x = 50; bunny.position.y = 50; stage.addChild(bunny); animate(); function animate() { requestAnimFrame(animate); renderer.render(stage); } function del() { stage.removeChild(graphics); stage.removeChild(text); stage.removeChild(bunny); } </script> <button name="button" onClick="del();">delete</button> </body></html>Thank you,-bubamara Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.