1 Reply Latest reply on Jun 29, 2011 9:20 AM by LilGames

    FLASH is VERSION 11 now and why still so many autoformat bugs!

    lala_future


      sometimes it put a  program note to some place else

       


      sometimes it add blank line

       


      sometimes it add sth to the end of progrem (like ; to the end })
      then tell me that is the problem

       


      and once the bug appears, I have to GUESS what cause those bugs, and find another way to write my code

       

      but now the following codes suddenly causes the third kind of bug and am I going to continue my code without autoformat for the rest of programme on that page? For Christ' Sake!

       

      _________

       


      function ina_box_sideBar_mouseRelease(e:MouseEvent) {
      //this event occurs when a part is put into the 4 side bars of a box , also the sur circle

       

      var tempObj;
      var tempMode;

       

       

       

      //now the real stuff start;
      ///trace(e.target+e.target.name);
      if (stuffHeld != null) {
      //make sure picked sth up
      if (e.target.parent.tobj == null) {
      //put sth to empty box
      tempObj = stuffHeld.backLink;

       

      } else {
      //add things to things in the box

       

      stuffHeld = null;

       


      //as there will be two part inside, open the check btn for the robot
      if (e.target.parent.check.currentFrame == 1) {
      e.target.parent.check.play();
      } else {
      if (e.target.parent.check.board.currentFrame == 30 || e.target.parent.check.board.currentFrame == 60) {
      e.target.parent.check.gotoAndPlay("downAndUp");
      }
      }

       


      if (e.target.name == "side_s") {
      //sur

      e.target.parent.tobj = tempMode;

       

      }
      if (e.target.name == "side_u" || e.target.name == "side_d") {
      //from up
      if (e.target.parent.tobj.cmode <= 0 || e.target.parent.tobj.cmode == 3) {
      //kid and kid make a cmode

       

      if (e.target.name == "side_u") {
      tempMode.kids = [tempObj,e.target.parent.tobj];
      tempMode.conSequeA.push(0);
      } else if (e.target.name == "side_d") {
      tempMode.kids = [e.target.parent.tobj,tempObj];
      tempMode.conSequeA.push(1);
      }

       

      e.target.parent.tobj = tempMode;
      } else if (e.target.parent.tobj.cmode == 1) {
      //hor, different from input

      if (e.target.name == "side_u") {
      tempMode.kids = [tempObj,e.target.parent.tobj];
      tempMode.conSequeA.push(0);
      } else if (e.target.name == "side_d") {
      tempMode.kids = [e.target.parent.tobj,tempObj];
      tempMode.conSequeA.push(1);
      }

       

      e.target.parent.tobj = tempMode;
      } else if (e.target.parent.tobj.cmode == 2) {
      //ver, the same
      //no more layer, add a new kid
      if (e.target.name == "side_u") {
      e.target.parent.tobj.kids.unshift( tempObj );
      e.target.parent.tobj.conSequeA.push(0);
      } else if (e.target.name == "side_d") {
      e.target.parent.tobj.kids.push( tempObj );
      e.target.parent.tobj.conSequeA.push(e.target.parent.tobj.kids.length-1);
      }
      }

       

      }
      //
      if (e.target.name == "side_l" || e.target.name == "side_r") {
      //from up
      if (e.target.parent.tobj.cmode <= 0 || e.target.parent.tobj.cmode == 3) {
      //kid and kid make a cmode

       

      if (e.target.name == "side_l") {
      tempMode.kids = [tempObj,e.target.parent.tobj];
      tempMode.conSequeA.push(0);
      } else if (e.target.name == "side_r") {
      tempMode.kids = [e.target.parent.tobj,tempObj];
      tempMode.conSequeA.push(1);
      }

       

      e.target.parent.tobj = tempMode;
      } else if (e.target.parent.tobj.cmode == 2) {
      //ver, different from input
      //set up new layer
      tempMode=new Object();
      tempMode.cmode = 1;
      tempMode.drawTar = e.target.parent;
      tempMode.spx = 0;
      tempMode.spy = 0;
      tempMode.ht = boxLength;
      tempMode.wd = boxLength;
      tempMode.conSequeA = [];

       

      if (e.target.name == "side_l") {
      tempMode.kids = [tempObj,e.target.parent.tobj];
      tempMode.conSequeA.push(0);
      } else if (e.target.name == "side_r") {
      tempMode.kids = [e.target.parent.tobj,tempObj];
      tempMode.conSequeA.push(1);
      }

       

      e.target.parent.tobj = tempMode;
      } else if (e.target.parent.tobj.cmode == 1) {
      //hor, the same
      //no more layer, add a new kid
      if (e.target.name == "side_l") {
      e.target.parent.tobj.kids.unshift( tempObj );
      e.target.parent.tobj.conSequeA.push(0);
      } else if (e.target.name == "side_r") {
      e.target.parent.tobj.kids.push( tempObj );
      e.target.parent.tobj.conSequeA.push(e.target.parent.tobj.kids.length-1);
      }
      }

       

      }
      }
      //draw thing
      Draw_COM( AddCN_COM(e.target.parent.tobj),1);
      //
      }
      }

       


      _________