Jump to content

How to create clickable logo with object data?


Biggerplay
 Share

Recommended Posts

The Spil API has a getLogo method, which returns this.

{height: 50image : "http://www.url-link-pointing-to-default-image-logo.com/default-logo.png",link  : "http://www.url-link-pointing-to-default-Spil-Games-portal.com",type  : "png",mime  : "image/png",scale : 1style : "margin-left:10%;margin-bottom: 25%;height: 10%;"width : 202}

How can I use that data with Phaser to create a clickable logo?

Link to comment
Share on other sites

First you have to load the logo by using the following code:

game.load.image('logo_name', obj.image);

You have to change obj to the result you get from the API.

And for the rest you should just check out this example :).

http://examples.phaser.io/_site/view_full.html?d=basics&f=02+-+click+on+an+image.js&t=02%20-%20click%20on%20an%20image

Link to comment
Share on other sites

First you have to load the logo by using the following code:

game.load.image('logo_name', obj.image);

You have to change obj to the result you get from the API.

And for the rest you should just check out this example :).

http://examples.phaser.io/_site/view_full.html?d=basics&f=02+-+click+on+an+image.js&t=02%20-%20click%20on%20an%20image

 

How to make it open up the link in a new window/tab though?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...