aulavirtualtest's Forum Posts

  • export async function createVideo(iframeId) {

    Globals.ytPlayer[iframeId]["player"] = await YouTube.CreatePlayer(iframeId, {

    "onStateChange": e => { Globals.ytPlayer[iframeId]["state"] = e.data; },

    "onReady": e => {}

    });

    return true;

    };

    How do I use the state to change a global variable at an event sheet?

    I want something like this, but I cant find the way to mix both examples:

    const stateTextInst = runtime.objects.StateText.getFirstInstance();

    const ytPlayer = await YouTube.CreatePlayer("youtubeIframe", {

    "onStateChange": e =>

    {

    // When the player state changes, show it in the StateText object.

    stateTextInst.text = "" + e.data;

    }

    });

    Thanks for the links.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Basically what I ask on the subject. Is it even possible? I had try many conmbinations but nothing works.

    Also, is it posible to change the on click a button from the example API to a OnTouchedObject from a Touch?

    I´m kinda new on JS so I feel totaly lost on this.

    Thanks in adavance.