@strmiska, @Photics, (@agent.pires)
Guys! He is referring to the parameters / arguments in a function.
Basically:
function untitled(hypeDocument, element, event)
Here hypeDocument, element and event are the arguments that are passed to the function.
This is done via the Hype API. If they have not been declared then they are set to undefined. The API does not allow you to call a function with more than the specified amount of arguments. In that, I mean that you cannot pass an argument (parameter) within the hype’s functions() call. You can only pass the three that are available.
So @classic12 in answer to your question you cannot achieve what it is you are trying to achieve by passing an extra parameter / argument to a Hype function.
There are probably other ways to achieve what you want. If you can elaborate on what you are trying to do or share a document then I’m sure someone can come up with something.
You could do this:
NOTE All functions have a built in object (arguments). This object holds the values of arguments that were used when the function was called (invoked). You can use this to access the argument (provided you know what key or position the argument is in - easy if there is only one being used ;)) Example:
function changeText(hypeDocument, element, event) {
textPrice.innerHTML = arguments[0];
}
Then when you call this function anywhere else in your document (in another function) like this:
hypeDocument.functions().changeText("$1.40");
then the value of the “textPrice” variable (element) will change to whatever is in the arguments. In this case $1.40.
arguments.hype.zip (15.2 KB)