2 Replies Latest reply on Aug 16, 2006 6:03 AM by aniebel

    Another multiple mc problem

    aniebel Level 2
      First, I cannot get the class to make the leaf rotate... that's another issue... but also, I cannot get multiple leaves to react. I tried David Stiller's recommendation from his blog on controlling multiple mcs but it's not working for me.

      This is not working:
      var allLeaves:MovieClip;
      for(var i:Number; i<120; ++i){
      allLeaves = this["leaf" + i ];

      This works:

      This is the class:
        • 1. Re: Another multiple mc problem
          There's no initial valuse set for i

          for(var i:Number = 0; i<120; ++i)

          Aside form that, the class file needs some tidying (should assign values to properties in the constructor, 'duration' is a reserved word so shouldn't be used as a property name elsewhere etc- this stuff can lead to code being 'unpredictable'
          • 2. Re: Another multiple mc problem
            aniebel Level 2
            Thank you, that was it. It also just occurred to me that I might need to set the class to "Leaf" but it worked either way.

            I actually don't use those properties in the class and had forgotten to delete them. This is my first class so it's still not crystal clear how it should work but I'm getting there.

            Thanks, again.