18 Replies Latest reply on Mar 16, 2011 12:57 PM by melas076

    problem with create a duplicate textfield in AS2

    melas076 Level 1

      This is my xml file:

       

      <?xml version="1.0" encoding="utf-8"?>
      <news>
      <Product id="0" titles="MH 20" imgURL="images/image1.jpg">
      <title>Multi Host 20</title>
      <body>Many companies are running more than one network simultaneously to have the different service systems.
      A modern business network should be an integrated network platform that  can afford a reliable service coverage and service bearing on the same  network infrastructure.
      Multi-Host is designed to help businesses control and manage their it  resources by integrating and standardizing several key components into  an all-in-one solution.
      This is the only means to lower the operation and maintenance costs  while achieving a higher management efficiency and a highly-unified  standard.</body>
      </Product>
      <Product id="1" titles="MH50" imgURL="images/image2.jpg">
      <title>Multi Host 50 </title>
      <body>Mutli Host 50.
      Many companies are running more than one network simultaneously to have the different service systems.
      A modern business network should be an integrated network platform that  can afford a reliable service coverage and service bearing on the same  network infrastructure.
      Multi-Host is designed to help businesses control and manage their it  resources by integrating and standardizing several key components into  an all-in-one solution.
      This is the only means to lower the operation and maintenance costs  while achieving a higher management efficiency and a highly-unified  standard.</body>
      </Product>
      <Product id="2" titles="MH100" imgURL="images/image3.jpg">
      <title>Multi Host 100 </title>
      <body>Mutli Host 100.
      Many companies are running more than one network simultaneously to have the different service systems.
      A modern business network should be an integrated network platform that  can afford a reliable service coverage and service bearing on the same  network infrastructure.
      Multi-Host is designed to help businesses control and manage their it  resources by integrating and standardizing several key components into  an all-in-one solution.
      This is the only means to lower the operation and maintenance costs  while achieving a higher management efficiency and a highly-unified  standard.</body>
      </Product>
      </news>

       

      this is my as2 code in flash:

      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;
       
      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);
      prodtitle.createTextField("prod_title"+i, i+3);
      prodtitle.prod_title.text = ptitle;


      }

      My problem is:

      1. How to create a textfield with his picture?

       

      i  would like to make a product page. it will contain pictures of the  product with his name in below. then i click on one of these pictures or  textfields, it will go the description page.

       

      i hope that you understand what i need and help me.

       

      regards,

      MELAS