How to Position of a dynamically created child symbol.


hello everyone,

 

i created symbols instances on stage by

 

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

{

    sym.createchildsymbol("rect", "stage");

}

 

now wanted set position of each symbol  - probelm don't know names of symbols instances has been created. tried following

 

childsymbols = sym.getchildsymbols();

 

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

{

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

}

 

it did not position child symbols need be..

 

however, when tried apply css element inside symbol worked.

 

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

{

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

}

 

please can help..

y = 0;

x = 30;

$.getjson('slides.json', function(data){

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

                     var s = sym.createchildsymbol("rect", "stage");

                     s.getsymbolelement().css({

                                      "top": x+"px",

                                      "position":"absolute",

                                      "right": y*315+20+"px"

                                                             });

                    x+=100;

                  // y+=100;

                          }//for

});



More discussions in Edge Animate CC


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account