1 Reply Latest reply on Apr 16, 2007 8:24 AM by Garenne

    How to create Links dynamically

      I've tried for several days to create links dynamically, and I can't get it work out.

      Here is what my application do : in a viewstack, I create dynamically some canvas as children of the viewstack. The number of canvas depend on the number of items in an arraycollection.

      Creation of a canvas (included in a "for" loop):
      Objet_Courant = Curseur.current;
      var canvas_cible:Canvas = new Canvas;
      canvas_cible.id = "CN_"+i;
      canvas_cible.width = 315;
      canvas_cible.height = 160;

      I inject content in each canvas the same way :

      var newModele:Text = new Text;
      newModele.id = "MODELE_"+i;
      newModele.text = (Objet_Courant.modele) as String;

      And now my question (at last) : I would like to create links, for example on the text item. The URL of the link would come from the arraycollection, as the other datas I use.

      Does anyone have a clue for this ?
      Thanks in advance.
        • 1. Re: How to create Links dynamically
          Garenne Level 1
          I still get stuck with this problem, even several months after... I had the same problem with creating links on images, when I dynamically create Tilelists with images as an ItemRenderer. How can we associate links with the images ?

          Any kind of help would be great :)