A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: flash error messages

  1. #1
    Registered User
    Join Date
    Dec 2000
    Posts
    144
    Does any one know why sometimes you'll get a flash player script running too slowly error?

    I think it has to do with a script not keeping up to the frame rate?

    if so if I were to lower my frame rate would this help eliviate the problem?

    If not does anyone know of any good efficient sripts that could do an error checking loop on say 90 text fields to see if a decimal has been entered more than once? this is the script that is causing me troubles.


    // this script creats a loop that checks all the tonnage
    // fields "v5af1..n" for more than one decimal place.
    on (release) {
    for (j=0; j<90; j++) {
    for (i=0; i<90; i++) {
    if (eval("v5af"+j).substring(i, i+1) == ".") {
    eval("temp"+j) += 1;
    }
    ;
    }
    ;
    if (eval("temp"+j)>1) {
    error = 1;
    eval("temp"+j) = "";
    break;
    } else {
    error = 0;
    eval("temp"+j) = "";
    }
    ;
    }
    ;
    // if the error variable = 1 then we know there was a double
    // decimal found and the error movie is set to gotoAndStop on
    // frame 2 (shows error message
    if (error == 1) {
    tellTarget ("_root.error") {
    gotoAndStop (2);
    }
    // else if error = 0 we know that there is no problems and we
    // can continue on to the next question.
    } else if (error == 0) {
    gotoAndStop ("customized screen");
    }
    }


    thanks for any and all help on this

    Jason

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi Jason,

    your strings are each 90 chars long? Maybe check until
    string length - or try this
    for(j = 0 ; j < 90 ; j++)
    { var str = eval("v5af"+j);
    var period = str.indexOf(".");
    if(period > 0 && str.length > period+1)
    { error = 1;
    break;
    }
    }

    If it still does not work, process a few variables per frame only

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center