A Button, DIV etc are seen as an objects. they have a structure with properties.
Initially you may give the them some properties to reference it. i.e an ID.
When you load that ID into a Variable / var, you are loading a string that spells out the ID in TEXT characters.
That is all that Variable is holding.
The Getter and Setters want the object not text. They will not work with the text.
So for :
hypeDocument.getElementProperty(element, 'propertyName')
hypeDocument.setElementProperty(element, 'propertyName', value, 1.0, 'easeinout')
You see they asks for the element not element name or element id.
element is the object not a string saying it's name.
In Hype if the Javascript is triggered/called by a click action, like what a button does then the element in the variable named element in the arguments of the function :
Function foo(hypeDocument, element, event){
...
}
will represent the button.
This means you could place that in :
`hypeDocument.setElementProperty(element, 'opacity', 0.5, 1.0, 'easeinout');
And it would work.
If you want another element other than the calling one then you would need to place an Object reference to it in a Variable.
You would do this with an API that CAN use a string/text to return a reference to the Object directly.
You would place this reference to the object into a Variable.
var fooElement = hypeDocument.getElementById('foo');
Now we can use fooElement which as far as the Getter and Setter are concerned is the actual object.
`hypeDocument.setElementProperty(fooElement, 'opacity', 0.5, 1.0, 'easeinout');