Reading HTML elements

0 favourites
  • 3 posts
From the Asset Store
Get ready to dive into a sea of endless excitement with "Dolphin Jump," the thrilling new game that puts you in control
  • I'm attempting to create a project which uses a simple color picker. I've opted to use the HTML Element with the content '<input type="color">' which gives me a lovely default color picker. However, I now need to read the color value of the picker so that I can use it.

    After looking online, I've seen several suggestions but none have worked. The most promising one involved creating a global string called MyColor and using this method:

    Set HTML Element content to: <input type="color" id="colorPicker">

    On Space: runtime.globalVars.MyColor= document.getElementById("colorPicker").value;

    However, this doesn't appear to influence the variable at all.

    I'm aware there are workarounds such as creating my own color picker, but I really want to learn how to use HTML and javascript in Construct 3 so I'm determined to get to the bottom of this and hopefully gain a better understanding of these features.

  • Ashley Is it possible that this is a bug? I've continued to look online and my understanding is that this should be working and appears to have worked for others?

    My event sheet currently looks like this:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's very difficult to help just from screenshots and descriptions. By far the quickest and easiest way to get help is to share a project file.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)