3 Replies Latest reply on Sep 7, 2007 5:48 AM by Ardy15jan

    How can i set the coordinates of Moive clip

    aamirdharani
      Hi, i am new to action script , i want to duplicate the movie clip then when i want to set its location via "setproperty" but i can't get any success please guide me where i m making mistake. i am incrementing the x and y coordinates but every time it gives me 0 value of both x an y at every iteration.

      function LaodArr(success:Boolean){
      if(success)
      {
      var nameArr:Array=nameXml.firstChild.childNodes;
      trace(nameArr.length); // 3

      for(var i=0;i<nameArr.length;i++)
      {
      duplicateMovieClip(_root.PersonInfo,["PersonInfo"+i],i+50);

      setProperty(this.PersonInfo,_x,PersonInfo._x+(i+300));
      setProperty(this.PersonInfo,_y,PersonInfo._y+(i+300));
      trace(_x);
      trace(_y);
      trace(i);
      set(["PersonInfo"+i+".strName"],nameArr .firstChild.firstChild.nodeValue );
      trace(nameArr
      .firstChild.firstChild.nodeValue);
      }
      }
      }

      var nameXml:XML=new XML();
      nameXml.ignoreWhite=true;
      nameXml.onLoad=LaodArr
      nameXml.load("myXML.xml");