caragones Posted October 6, 2015 Share Posted October 6, 2015 Hi! I'm trying to create a bitmapData with some frames dinamically. To do that I make this: mBMD = new Phaser.BitmapData(mGame, "BMD", width, height * frames); // Draw the frames as spritesheet mGame.cache.addBitmapData(mBMD.key, mBMD, Phaser.AnimationParser.spriteSheet(mGame, mBMD.texture, width, height, -1, 0, 0));Then I create a button like this: button.Panel = WidgetFactory.mGame.add.button(300, 300, WidgetFactory.mBMD, callback, callbackContext, 1, 0, 0, 0);And all works fine. But if I create another button in the same way: button.Panel = WidgetFactory.mGame.add.button(300, 400, WidgetFactory.mBMD, callback, callbackContext, 1, 0, 0, 0);When the mouse is over whatever button all the buttons change their frame. What I'm doing wrong? Link to comment Share on other sites More sharing options...
Recommended Posts