dania_11 Posted May 15, 2017 Share Posted May 15, 2017 var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render }); function preload() { game.load.image('fon1', 'images/fon1.png', ); game.load.spritesheet('friends', 'images/friends.png', 153,82); game.load.spritesheet('public', 'images/public.png', 153,82); game.load.spritesheet('osebe', 'images/o sebe.png', 153,82); } function create() { //фон game.add.sprite(0,0,'fon1'); //кнопки buttonfriends = game.add.button(20,55,'friends',actionOnClickfriends,this,0,0,0); buttonpublic = game.add.button(340,55,'public',actionOnClickpublic,this,0,0,0); buttonosebe = game.add.button(560,55,'osebe',actionOnClickOsebe,this,0,0,0); } function actionOnClickfriends(){ } function actionOnClickpublic(){ } function actionOnClickOsebe(){ //here the code } function render(){ } Link to comment Share on other sites More sharing options...
snowbillr Posted May 15, 2017 Share Posted May 15, 2017 Sorry, I'm not really sure what you're asking. You mention an 'iframe tag in js code', but I don't see any references to iframes in what you posted. Can you add some more detail to your question and include the relevant javascript and html code snippets? Link to comment Share on other sites More sharing options...
Recommended Posts