3 Replies Latest reply on May 8, 2007 5:18 AM by MurMeeKeer

    dynamic movie creation issue..

      var diff_level = 3;
      var yPos = -10;
      for(i = 0;i<diff_level;i++){
      _root.createEmptyMovieClip("holder_mc"+i, this.getNextHighestDepth());
      yPos += 110;
      _root["holder_mc"+i].attachMovie("turret", "turret"+i, this.getNextHighestDepth());
      _root["holder_mc"+i]._x = 515;
      _root["holder_mc"+i]._y = yPos;
      _root["holder_mc"+i].onEnterFrame = function(){
      radians = Math.atan2(this._y-plane._y,this._x-plane._x);
      degrees = radians*(180/Math.PI);
      this._rotation = degrees;

      There is some other script.. moving around with Keylisteners etc but i didint include that as it wasnt relavent.

      Anywhoo my problem is i dont have any idea how to call my created clips so conditions are running for all of them (the ideal result is for the current number of 3 turrets to all follow the mouse, and eventually begin shooting). I am having problems trying to call the movieclips that i made dynamically, how can i call them all?