View Full Version : Hide button action
thetford
02-16-2005, 08:21 PM
Has anyone else had anytrouble getting the hide button action to work? I can't seem to get any results out of the action, I have no errors on preview, it just has no effect.
thanks in advance
Intrigued
02-16-2005, 08:29 PM
Do you mean the Button.SetVisible action?
Here is an example if so. It is working for me.
thetford
02-17-2005, 09:00 AM
Yes, Button.SetVisible action is what I'm referring to. Maybe there is a better way to accomplish my desired end result.
I have a check button (for user aggrement), what I was trying to accomplish with this action - check the user aggreement button, the next button is then visible.
So, I need button "B" to be hidden until button "A" is selected.
Intrigued
02-17-2005, 09:26 AM
How about something like this? (ugly, but it gets the point across I am hoping :D )
Intrigued
02-17-2005, 09:49 AM
Here is a link to the latest version I did. I put it up on my Website for AMS 5:
http://www.amsuser.com/ams/examples/UserAgreement-others-Intrigued.apz
Below is the code I put into the project (minus comments) and I tended to use the semi-colon to close a line of code at times and other times I did not. You do not need the semi-colon (;). But, I.R. documentation recommends the use of such.
------------------------------[[ SCRIPT: Global Script ]]------------------------------
01 --Enter global declarations and functions here...
02
------------------------------[[ SCRIPT: Page: Page1, Event: On Show ]]------------------------------
01 Button.SetEnabled("Button1", false)
------------------------------[[ SCRIPT: Page: Page1, Event: On Close ]]------------------------------
01 Button.SetEnabled("Button1", true)
02
03 Button.SetText("Button3", "");
------------------------------[[ SCRIPT: Page: Page1, Object: Button1, Event: On Click ]]------------------------------
01 Button.SetEnabled("Button1", false);
02
03 Page.Jump("Page2");
------------------------------[[ SCRIPT: Page: Page1, Object: Button2, Event: On Click ]]------------------------------
01 Application.Exit();
------------------------------[[ SCRIPT: Page: Page1, Object: Button3, Event: On Click ]]------------------------------
01 Button.SetText("Button3", "x")
02
03 Button.SetEnabled("Button1", true)
------------------------------[[ SCRIPT: Page: Page2, Object: Label2, Event: On Click ]]------------------------------
01 Page.Jump("Page1")
thetford
02-17-2005, 10:33 AM
thanks a lot!
Intrigued
02-17-2005, 10:55 AM
No problem thetford.
:yes
thetford
02-17-2005, 04:04 PM
ok, I'll try not to abuse your good nature, but one more question,
at the end of the quiz template when it gives you your percent correct score, how do you round that number so it's not so long?
thanks!
(in advance)
Intrigued
02-17-2005, 04:13 PM
ok, I'll try not to abuse your good nature, but one more question,
at the end of the quiz template when it gives you your percent correct score, how do you round that number so it's not so long?
thanks!
(in advance)
You can use the Math.Round action IF you are using AMS 5 Pro/Deluxe editions.
Here's a very basic rounding example project.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.