add an id to your element and run
hypeDocument.getElementById('yourId').innerHTML = 'Hello world'
Demo Project: helloWorld.hype.zip (11.5 KB)
First give an element such as a rectangle an ID in Hype’s “Identity Inspector” in the field “Unique Element ID”. Note that there can only be one element in your project with this ID.
Then, assuming You have given the name of “demo” to to this element, create a function with the following script…
document.getElementById("demo").innerHTML = "Hello World";
This script could be set to be triggered by “On Mouse Click” etc. in Hype’s “Actions Inspector”.
You can read more about “innerHTML” here.
Taking a slightly more advanced approach You could create a variable for this element and use that instead.
var myVariable = document.getElementById("demo"); myVariable.innerHTML = "Hello World";
Read more about “variables” here.
Using Hype’s API:
myVariable = hypeDocument.getElementById('demo'); myVariable.innerHTML = "Hello World";
Here is another way using classes. I am currently experimenting with the “fleeq” plattform for help files. Hope this helps.
Lovely video. Like your voice.
“Fleeq, it’s free if you are alone!”
I got the business plan
Years of training, “Gesangsunterricht“, and some snake oil. Viola!