1 Reply Latest reply on Jul 16, 2006 1:20 PM by

    CreateTextField formating problem

      Please go to http://www.guyverville.com, and click Librio.
      Text there is from a XML file and is put into an empty movie cilp present in the timeline. This is done with a function called 'Formatteur':

      function Formatteur(cible:MovieClip, positionX:Number, Racine:XMLNode, largeur:Number){
      .....
      var conteneur = cible.createTextField("Para" + i, i, positionX, hauteur, largeur, 0);
      .....
      }

      this function calls also a stylesheet coded earlier in the timeline.

      Click now on the first book. Again, the code calls the function Formatteur with another empty movie clip and passes the text data. I've check the data passed into that function and it is the same as the previous example. It applies the same style as the first text.

      Why then the text appears smaller? Here is the main coded involved. The two lines that call the function are:
      Formatteur(Contenu_mc, 10, Noeud, 500);
      ....
      Formatteur(resume_mc, 5, Noeud, 400);