6 Replies Latest reply on Apr 21, 2010 11:17 PM by kglad

    how to highlight similer images?

    JaxNa Level 1

      PayoutMC.swapDepths(1000)

       

       

       

      var reel_array:String = ("3,1,2,7,10,8,6,7,4,2,3,8,5,3,1,9,@10,6,1,8,4,3,5,9,1,2,2,8,3,7,3,7,@2,4,2,1,1,3,8,3,7,1 0,9,3,8,7,5,6,@2,6,5,8,1,7,2,9,4,10,3,8,7,1,3,3,@8,3,4,1,7,2,1,2,10,8,6,3,3,9,7,5,@");
      //****************************************Dot Net Variable**********************************************

       

      var my_array:Array = reel_array.split("@");
      var randomno:Array = new Array(my_array.length-1);
      var reel_array:Array = new Array(my_array.length-1);
      for (var k = 0; k<(my_array.length-1); k++) {
          reel_array[k] = my_array[k].split(",");
          randomno[k] = random(16);
      }

       

      _root.createEmptyMovieClip("sq_mc",this.getNextHighestDepth());
      sq_mc._x = 147;
      sq_mc._y = 336;
      var myObj:Object = new Object();
      myObj.rows = 3;
      myObj.columns = 5;
      myObj.space = 61;
      myObj.depth = 1;
      myObj.path = _root.sq_mc;
      myObj.path.swapDepths(0);
      function createGrid():Void {
          for (var j:Number = 0; j<myObj.rows; j++) {
              for (var i:Number = 0; i<myObj.columns; i++) {
                  var name:String = "cell"+i+"_"+j;
                  var x:Number = (i)*myObj.space;
                  var y:Number = (j)*myObj.space;
                  myObj.path.attachMovie("box_mc",name,++myObj.depth);
                  myObj.path[name]._x = x;
                  myObj.path[name]._y = -y;
                  myObj.path[name].createEmptyMovieClip("holder_mc",this.getNextHighestDepth());
                  var ind:Number = randomno[i]+(j-1);
                  if (ind<0) {
                      ind = 15;
                  } else if (ind>15) {
                      ind = 0;
                  }
                  myObj.path[name].holder_mc.loadMovie("images/jackpot/"+reel_array[i][ind]+".jpg");
                  //myObj.path.setMask(mask_mc);
              }
          }
      }
      createGrid();

       

      spin_btn.onRelease = function() {
          for (var j:Number = 0; j<myObj.rows; j++) {
              for (var i:Number = 0; i<myObj.columns; i++) {
                  var name:String = "cell"+i+"_"+j;

       

                  myObj.path[name].holder_mc._visible = false;
              }
          }
          _root.re1.gotoAndPlay(2);
          _root.re2.gotoAndPlay(2);
          _root.re3.gotoAndPlay(2);
          _root.re4.gotoAndPlay(2);
          _root.re5.gotoAndPlay(2);
      };

       

      _global.column1 = false;
      _global.column2 = false;
      _global.column3 = false;
      _global.column4 = false;
      _global.column5 = false;
      var my_str:String = "1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,";
      var display_array:Array = my_str.split(",");

      //// This is the final images display after the spin.
      Enter_mc.onEnterFrame = function() {
          if (_global.column1 == true) {
              for (var j:Number = 0; j<3; j++) {
                  var clip:String = "clip"+j;
                  re1.reel1[clip].loadMovie("images/jackpot/"+display_array[j*5]+".jpg");
                  trace("image="+clip);

       

              }
              re1.reel1.clip3.loadMovie("images/jackpot/3.jpg");
              re1.reel1.clip4.loadMovie("images/jackpot/4.jpg");
              re1.reel1.clip5.loadMovie("images/jackpot/5.jpg");
              _global.column1 = false;
          }
          if (_global.column2 == true) {
              for (var j:Number = 0; j<myObj.rows; j++) {
                   var clip:String = "clip"+j;
                  re2.reel1[clip].loadMovie("images/jackpot/"+display_array[j*5+1]+".jpg");
              }
              re2.reel1.clip3.loadMovie("images/jackpot/3.jpg");
              re2.reel1.clip4.loadMovie("images/jackpot/4.jpg");
              re2.reel1.clip5.loadMovie("images/jackpot/5.jpg");
              _global.column2 = false;
          }
          if (_global.column3 == true) {
              for (var j:Number = 0; j<myObj.rows; j++) {     
                  var clip:String = "clip"+j;
                  re3.reel1[clip].loadMovie("images/jackpot/"+display_array[j*5+2]+".jpg");       
              }
              _global.column3 = false;
              re3.reel1.clip3.loadMovie("images/jackpot/3.jpg");
              re3.reel1.clip4.loadMovie("images/jackpot/4.jpg");
              re3.reel1.clip5.loadMovie("images/jackpot/5.jpg");
          }
          if (_global.column4 == true) {
              for (var j:Number = 0; j<myObj.rows; j++) {
                  var clip:String = "clip"+j;
                  re4.reel1[clip].loadMovie("images/jackpot/"+display_array[j*5+3]+".jpg");  
              }
              _global.column4 = false;
              re4.reel1.clip3.loadMovie("images/jackpot/3.jpg");
              re4.reel1.clip4.loadMovie("images/jackpot/4.jpg");
              re4.reel1.clip5.loadMovie("images/jackpot/5.jpg");
          }
          if (_global.column5 == true) {
              for (var j:Number = 0; j<myObj.rows; j++) {         
                  var clip:String = "clip"+j;
                  re5.reel1[clip].loadMovie("images/jackpot/"+display_array[j*5+4]+".jpg");      
              }
              _global.column5 = false;
              re5.reel1.clip3.loadMovie("images/jackpot/3.jpg");
              re5.reel1.clip4.loadMovie("images/jackpot/4.jpg");
              re5.reel1.clip5.loadMovie("images/jackpot/5.jpg");
          }

      };

       

       

       

       

      I want to blink similer images in final display.

      display_array in a final images

       

       

       

      Thanks.