Reputation: 3
I'm trying to set up a function to hide Button1 and to make Button2 visible.
So far I can hide Button1 as I've written the following code in the Script Section:
function nextButton(Button1) {
Button1.visible = false;
}
In the OnClick event of Button1 I wrote:
nextButton(widget);
What I'm trying to do is to send Button2 to the function. I tried the following:
OnClick event: nextButton2(widget, Button2);
Script: function nextButton(Button1, Button2) {
Button1.visible = false;
Button2.visible = true; }
This way when I click on Button1 it would hide and Button2 will appear. But it seems that sending the name of the object (Button2) is not working.
Do you know how I can reference another object and send it to the function?
Upvotes: 0
Views: 63