A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Textbox, Strings and Pushing Arrays. Any Ideas?

Threaded View

  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    78

    Textbox, Strings and Pushing Arrays. Any Ideas?

    Hi Bret,
    Still trying to get past this text box problem. I've got to this point with help

    var correctString="The sad man";
    var correctArray=correctString.split(' ');

    txt2.onChanged=function(){
    var inArray=this.text.split(' ');
    var resultArray=new Array();
    for(i=0;i<correctArray.length;i++){
    if(inArray[i]==correctArray[i]){
    resultArray[i]='correct';
    gotoandStop(3);
    }else{

    resultArray[i]=' not correct "' + correctArray[i] +'"-------';
    }


    }
    txt3.text=(resultArray)
    }
    Selection.setFocus("txt2var");
    stop();


    But
    1. it goes to frame 3 even if only first word is correct should only do it if all correct.
    2. how can I not show the incorrect words ie have *** instead of sad?

    PS can no one solve the koolmoves exchange menu1 problem - 189 views but only you responding.
    Attached Files Attached Files

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