快速业务通道

Flash游戏制作:打砖块

作者 佚名技术 来源 服务器技术 浏览 发布时间 2012-07-14
));
  c = Number(c)+1;
  count = Number(count)+1;
  }
  //复制对象brickblue
  r = Number(r)+2;
  index = Number(index)+2;
  c = Number(index)+1;
  }
  c = 0;
  r = 7;
  //c和r为两个循环变量
  while (Number(r)<9) {
    while (Number(c)<10) {
      duplicateMovieClip("/brickgreen", "brick" add r add c, Number(count)+1);
      //复制对象brickgreen,一共复制16个
      setProperty("brick" add r add c, _x, 220+Number(40*c));
      setProperty("brick" add r add c, _y, 50+Number(20*r));
      c = Number(c)+1;
      count = Number(count)+1;
    }
    //设置复制出的砖块的坐标
    c = 0;
    r = Number(r)+1;
  }
  setProperty("/brick", _visible, false);


  在此图层第11 帧添加as,下面的as和第10帧相类似,不过游戏的等级更高
  xspeed = 1;
  border = 150;
  bricknumber = 50;
  Level_index = Number(Level_index)+1;
  c = 0;
  r = 0;
  //c和r为两个循环变量
  count = 1;
  while (Number(r)<5) {
    while (Number(c)<10) {
    if (((Number(r)<=Number(c)) and (Number(c)<5)) or ((Number(c)>=5) and (Number(c)<=Number(9-r)))) {
      duplicateMovieClip("/brick", "brick" add r add c, Number(count)+1);
      } else {
        duplicateMovieClip("/brickgreen", "brick" add r add c, Number(count)+1);
      }
      setProperty("brick" add r add c, _x, 220+Number(40*c));
      setProperty("brick" add r add c, _y, 50+Number(20*r));
      count = Number(count)+1;
      c = Number(c)+1;
    }
    //复制对象brick
    r = Number(r)+1;
    c = 0;
  }

  在此图层第12 帧添加as, 下面的as和第11帧相类似,不过游戏的等级更高
  xspeed = 2;
  border = 330;
  bricknumber = 60;
  c = 0;
  r = 0;
  //c和r为两个循环变量
  count = 1;
  while (Number(r)<14) {
    while (Number(c)<10) {
      if ((Number(r) == 5) or (Number(r) == 8)) {
        duplicateMovieClip("/brickred", "brick" add r add c, Number(count)+1);
      } else if ((Number(r) == 13) or (Number(r) == 0)) {
        duplicateMovieClip("/brickblue", "brick" add r add c, Number(count)+1);
      } else if ((Number(r) == 7) or (Number(r) == 6)) {
        duplicateMovieClip("/brick", "brick" add r add c, Number(count)+1);
      }
      setProperty("brick" add r add c, _x, 220+Number(40*c));
      setProperty("brick" add r add c, _y, 50+Number(20*r));
      c = Number(c)+1;
      count = Number(count)+1;
    }
    r = Number(r)+1;
    c = 0;
  }
  setProperty("/brick", _visible, false);

  在此图层第13 帧添加as,下面的as和第12帧相类似,不过游戏的等级更高
  xspeed = 3;
  border = 250;
  bricknumber = 72;
  c = 0;
  r = 0;
  //c和r为两个循环变量
  count = 1;
  while (Number(r)<10) {
    while (Number(c)<10) {
      if (((Number(r)>1) and (Number(r)<8) and (Number(c)>3) and (Number(c)<6)) or ((Number(c)>1) and (Number(c)<8) and (Number(r)>3) and (Number(r)<6))) {
        duplicateMovieClip("/brickgreen", "brick" add r add c, Number(count)+1);
  } else if (((Number(r) == Number(Number(5-9)+Number(c))) and (Number(r)>0) and (Number(r)<5)and (Number(c)>4) and (Number(c)<9)) or ((Number(r) == Number(5-c)) and (Number(r)>0) and (Number(r)<5) and (Number(c)>0) and (Number(c)<5)) or ((Number(9-r) == Number(5-c)) and (Number(r)>4) and (Num

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号