3 Replies Latest reply on May 6, 2013 2:43 AM by Zaxist

    How to Position of a dynamically created child symbol.

    Vinay Nellagi

      Hello Everyone,

       

      I created symbols instances on the stage by

       

      for(alpha = 0; alpha < 5; alpha++)

      {

          sym.createChildSymbol("rect", "Stage");

      }

       

      Now I wanted to set the position of each symbol  - The probelm is I don't know the names of the symbols instances that has been created. so I tried the following

       

      childSymbols = sym.getChildSymbols();

       

      for(k = 0; k < 5; k++)

      {

          childSymbols[k].css({"position":"relative","left":k*50});

      }

       

      it did not position the child symbols where i need it to be..

       

      HOWEVER, when I tried to apply css to an element inside the symbol it worked.

       

      for(k = 0; k < 5; k++)

      {

          childSymbols[k].$("Rectangle2").css({"position":"relative","left":k*50});

      }

       

      Please can anyone help..