How to make drew text do function after clicked?

Discussion in 'Learning Javascript' started by dyaskur, Jul 9, 2016.

  1. dyaskur

    dyaskur Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    Java
    example i made this code


    this.drawText("->", 0, 0, this.contentsWidth(), "right");
    this.drawText("OK", 0, 0, this.contentsWidth(), "center");
    this.drawText("<-", 0, 0, this.contentsWidth(), "left");


    or


    var text = $dataSystem.gameTitle;
    this._gameTitleSprite.bitmap.outlineColor = 'blue';
    this._gameTitleSprite.bitmap.outlineWidth = 8;
    this._gameTitleSprite.bitmap.fontSize = 50;
    this._gameTitleSprite.bitmap.drawText(text, 0,0 , maxWidth, 48, 'center');




    and how to make the text that i drew can be clicked and do a function or run code after that.
     
    Last edited by a moderator: Jul 9, 2016
    #1

Share This Page