Greetings all,

I've got a form type application in which I use a the NumericStepper component from Flash 8 professional. We're asking users to rate a series of items on a 1 to 3 scale. I've set the minimum value for all instances of the NumericStepper to 0, the maximum value to 3 and the step size to 1. On entering the frame, the values are set to 0. There's a forward button which is disabled until all the instances of the stepper have non-zero values. A listener watches for changes in the steppers and then updates values in a LoadVars object that I'm using to pass the results to a PHP script at the end. It's all fairly straight-forward and working well.

Well, except for a small number (about 1% or so) of users results are passed as a 0. They all were using Internet Exploder (big surprise there, huh?). The actionscript code follows. Am I missing something obvious?

Thanks for any help!

Jim

/////////////////
//SCRIPT ON FRAME
//(myData_lv and nsListener objects
//already instantiated previous frame)
/////////////////
//
//set initial values of lv object to 0
myData_lv.q08Aa = myData_lv.q08Ab=myData_lv.q08Ac=myData_lv.q08Ad=myData_lv.q08Ae=myData_l v.q08Af=0;
//set values of numeric steppers onstage to 0
numStepA.value = numStepB.value=numStepC.value=numStepD.value=numStepE.value=numStepF.val ue=0;
//disable forward button
fwd_btn.enabled = false;
fwd_btn._alpha = 50;
//set interval to activate fwd button when values all non-zero
clearInterval(loadInt);
function moveOn() {
if (myData_lv.q08Aa == 0 || myData_lv.q08Ab == 0 || myData_lv.q08Ac == 0 || myData_lv.q08Ad == 0 || myData_lv.q08Ae == 0 || myData_lv.q08Af == 0) {
                fwd_btn.enabled = false;
                fwd_btn._alpha = 50;
        } else {
                fwd_btn.enabled = true;
                fwd_btn._alpha = 100;
        }
}
//
loadInt = setInterval(moveOn, 20);
//listen for changes to the numSteppers onstage and update lv object values
nsListener.change = function(evt_obj:Object) {
        switch (evt_obj.target) {
        case numStepA :
                myData_lv.q08Aa = numStepA.value;
                break;
        case numStepB :
                myData_lv.q08Ab = numStepB.value;
                break;
        case numStepC :
                myData_lv.q08Ac = numStepC.value;
                break;
        case numStepD :
                myData_lv.q08Ad = numStepD.value;
                break;
        case numStepE :
                myData_lv.q08Ae = numStepE.value;
                break;
        case numStepF :
                myData_lv.q08Af = numStepF.value;
                break;
        }
};
// Add listeners
numStepA.addEventListener("change", nsListener);
numStepB.addEventListener("change", nsListener);
numStepC.addEventListener("change", nsListener);
numStepD.addEventListener("change", nsListener);
numStepE.addEventListener("change", nsListener);
numStepF.addEventListener("change", nsListener);
//forward button active should work only if all values are not 0
fwd_btn.onRelease = function() {
if (myData_lv.q08Aa == 0 || myData_lv.q08Ab == 0 || myData_lv.q08Ac == 0 || myData_lv.q08Ad == 0 || myData_lv.q08Ae == 0 || myData_lv.q08Af == 0) {
                //nothing;
        } else {
                //OK TO GO ONWARD....
                nextFrame();
        }
};

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to