5 Replies Latest reply on Nov 17, 2008 10:53 AM by logeye

    crawing concentric circles

    logeye
      Greetings,

      I am trying to create with AS2, a number of concentric circles. I can create one circle just fine from the AS examples
      .
      I then use this ;

      for(){
      create circle
      }

      I think I'm having a naming problem.

      Any ideas???


      Thanks for all for supporting this forum.
        • 1. Re: crawing concentric circles
          robdillon Most Valuable Participant
          In your example, the variable i is a number. You can't name a movieClip with a number, and so your movieclips aren't actually being created.

          Change these three lines:
          this.createEmptyMovieClip(i, this.getNextHighestDepth());
          i.lineStyle(lineWidth, 0x000000);
          drawCircle(i, xCenter, yCenter, i*10);
          to:
          this.createEmptyMovieClip(this["mc" + i], this.getNextHighestDepth());
          this["mc" + i].lineStyle(lineWidth, 0x000000);
          drawCircle(this["mc" + i], xCenter, yCenter, i*10);
          or, even better:
          var newName = "mc" + i;
          this.createEmptyMovieClip(newName, this.getNextHighestDepth());
          this[newName].lineStyle(lineWidth, 0x000000);
          drawCircle(this[newName], xCenter, yCenter, i*10);
          • 2. Re: crawing concentric circles
            logeye Level 1
            Thanks Rob, That did it.

            I also had to change the function drawCircle()

            to drawCircle = function()

            in order for it to work.
            • 3. Re: crawing concentric circles
              logeye Level 1
              I'm pulling my hair out. It's got to be a path problem.

              I am trying to create 2 movie clips. each clip has a number of concentric circles. Rob helped with the latter. I've tried to use the same methodology to create these two clips. When I publish it I only draws the first circle of top1.????

              I have tried making only one movieclip and drawing a number of circles inside that movieclip. Thay didn't work.

              Any tutorials on creating movieclips inside movieclips??

              Thanks for all your suggestions.
              • 4. Re: crawing concentric circles
                logeye Level 1
                oops heres the code
                • 5. Re: crawing concentric circles
                  logeye Level 1
                  It Works.

                  Thanks Rob for the help.

                  Attached is the code. It is designed to create an inteference pattern. Like when you place two speakers close together and to can tell where the dead sp[ots may be.

                  If you work for it, success means so much more.