0 Replies Latest reply on Oct 12, 2010 7:11 PM by dn0myar06

    crossword game, help please!!!

    dn0myar06

      hi! i'm having problem with  the intersection of my cross word puzzle....

       

      i created mc's in the first box of every number and attached these codes;

       

      this is the code that i attached in number 2:

       

      on (release) {
      _root.ctr = 0;
      y12_mc._alpha = 100;
      y11_mc._alpha = 0;
      var tl:MovieClip=this
      var alphaS:String="abcdefghijklmnopqrstuvwxyz";
      var alphaA:Array = alphaS.split("");

       

      var kLO:Object = new Object();
      kLO.onKeyDown = function() {
          for(var j:Number=0;j<26;j++){
                if (Key.isDown(65+j || 97+j)) {
                _root.ctr++;
                if (_root.ctr < 5) {                      //number 2 has 4 letters
                    if (_root.ctr == 2) {               //i use this code to change the intersected dynamic text
                       c116.text = alphaA[j];
                     }
                     tl["c"+(120+_root.ctr)].text = alphaA[j];
                }
              }
            }
      }
      Key.addListener(kLO);
      }

      cr2.jpg

      its working until i click on the mc number 1 and typed Q, W, E, R:


      this is what happen

       

      cr1.jpg

       

      this is the code on mc box 1:

       

      on (release) {
      _root.ctr = 0;
      y11_mc._alpha = 100;
      y12_mc._alpha = 0;
      var tl:MovieClip=this
      var alphaS:String="abcdefghijklmnopqrstuvwxyz";
      var alphaA:Array = alphaS.split("");

      var kLO:Object = new Object();
      kLO.onKeyDown = function() {
          for(var j:Number=0;j<26;j++){
                if (Key.isDown(65+j || 97+j)) {
                _root.ctr++;
                if (_root.ctr < 9) {                                             //number 1 consists of 8 letters
                     tl["c"+(110+_root.ctr)].text = alphaA[j];
                }
              }
            }
      }
      Key.addListener(kLO);
      }

       

      what could be wrong?? i tried to change the name of the variables like alphaS2, alphaA2....but same outcome....