The first tutorial is actually a pretty good one, showing you how with javascript. The second is very basic, but you’ll get the idea and will probably be able to create you’re own after you’re done with it.
I don’t get what you mean by adding that code to the validation… you mean if it does find an error, you want that script to work?
I provided the code that worked for other variables. I cannot seem to get any variation of that to work for the checkboxes (require one checked) and phone number (to make it require numeric values).
Javascript cannot be used because it must be a self contained movie on a third party website.
Phone number part is easy, just click character, and then choose only numerals (0-9). That won’t let the user put anything but numerals inside the input box.
About the checkboxes, that requires a bit of coding.
the getEnabled method of a checkbox returns a true or false value on whether the box is checked or not. If you keep testing until the last one, you can put the error movie inside the deepest if else statement, then just close all of them. The code above is way screwed up, I’m writing this in a rush, but I think you get the idea ;).
This is what worked for anyone who comes across this problem:
If you just want to check if any checkboxes are checked that should not be too hard. You want to set a variable when the checkbox is checked. Then test to see if that variable is set or not.
I don’t know how you made your custom checkboxes but there has to be some part of code that puts the check in and takes it off when the user clicks. Add this to the check on part,
_root.myVar++
And this to the check off part,
_root.myVar–
Then test it (I guess on a button push),
on (press) {
if (_root.myVar>0) {
loadMovie(“a_box_is_checked.swf”, 1);
} else {
loadMovie(“no_box_is_checked.swf”, 1);
}
}
Creating engaging and entertaining content for designers and developers since 1998.