15 Replies Latest reply on Mar 19, 2011 5:50 AM by Ned Murphy

    problem in align of createEmptyMovieClip

    melas076 Level 1

      Dear all,

       

      I have a problem with AS2 to align a createEmptyMovieClip.

       

      i want to align on the left of my stagei don't know why it is appear in the top and center of my stage.

       

      thanks and regards,

      MELAS

       

      this is the code:

      stop();

       

      var Liste:XML = new XML();
      Liste.ignoreWhite = true;
      Liste.load("XML/products.xml");
      Liste.onLoad =  function(success){
       
      var galleriev = Liste.firstChild.childNodes;

      var lon = galleriev.length;
      //var output:String = "";
      var column = 0;
      var line = 0;
      for (var i = 0; i<lon; i++) {

      var nom = galleriev[i].attributes.imgURL;
      //trace(nom);
      var ptitle = galleriev[i].attributes.titles;
      //trace (ptitle);

      _root.prodtitle.createEmptyMovieClip("prodtitle"+i,i+3);
      //_root.prodtitles.y= 0;
      _root.prodtitle.createTextField("prod_title"+i,i+3,0,0,200,300);
      _root.prodtitle["prod_title"+i].multiline=true;
      _root.prodtitle["prod_title"+i].html=true;
      _root.prodtitle["prod_title"+i].wordWrap=true;
      _root.prodtitle["prod_title"+i].htmlText ="<a href='"+descriptionpageURL+"'><img src='"+nom+"' /></a><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>"+ptitle;

       

      if (column == 3) {

      column = 0;

      line++;
      }else{
      column++;   
      }
      //i++
      _root.prodtitle["prod_title"+i]._x = column*250;
      _root.prodtitle["prod_title"+i]._y = line*200;
      }
      }