2 Replies Latest reply on Sep 12, 2007 12:24 AM by ActionJes

    Script in MX 6.0

    ActionJes
      Howdy folks,

      why does this script not work in Flash MX 6.0:

      var numOfItems:Number = 10;
      var radiusX:Number = 50;
      var radiusY:Number = 20;
      var centerX:Number = Stage.width/2;
      var centerY:Number = Stage.height/2;
      var speed:Number = 0.05;

      for(var i=0;i<numOfItems;i++)
      {
      var t = this.attachMovie("item","item"+i,i+1);
      t.angle = i * ((Math.PI*2)/numOfItems);
      t.onEnterFrame = mover;
      }
      function mover()
      {
      this._x = Math.cos(this.angle) * radiusX + centerX;
      this._y = Math.sin(this.angle) * radiusY + centerY;
      this.angle += this._parent.speed;
      }


      I have a Movieclip in my Library named "item" in the Linkage-properties.
      The script is placed in frame #1 on the main timeline.

      I'm going crazy here....what have I overlooked?

      Thankfull for any help.