3 Replies Latest reply on Mar 23, 2007 8:08 AM by LeeBert

    Trouble getting _x position

      Hi all

      Just trying to create a box in actionscript into an empty movieclip. I then wanted to reurn the _x postion of the box, but it's just not happening for me. Here is my code. Any ideas?

      Cheers all

      Stage.scaleMode = "scale";
      ////Create a box to encapsulate the loader indicator
      var bW:Number = 200;//Width of loader
      var bH:Number = 8;//Height of loader
      var bLC:Number = 0x777777;//Colour of loader box
      var bFC:Number = 0xFFFFFF;//Fill colour of loader box
      var inC:Number = 0x4654FF;//Fill colour of indicator
      var loaderBox_mc:MovieClip = this.createEmptyMovieClip("loaderBox_mc", this.getNextHighestDepth());
      loaderBox_mc.beginFill(bFC, 100);
      loaderBox_mc.lineStyle(1, bLC, 100);
      loaderBox_mc.moveTo((Stage.width/2)-bW/2, (Stage.height/2)-bH/2);
      loaderBox_mc.lineTo((Stage.width/2)+bW/2, (Stage.height/2)-bH/2);
      loaderBox_mc.lineTo((Stage.width/2)+bW/2, (Stage.height/2)+bH/2);
      loaderBox_mc.lineTo((Stage.width/2)-bW/2, (Stage.height/2)+bH/2);
      loaderBox_mc.moveTo((Stage.width/2)-bW/2, (Stage.height/2)-bH/2);