get Position of dynamically placed childs


hello adobe community

 

maybe had same problem before... create child symbols on stage, give childs x , y startposition , tell them float left. works good.
but x , y position of each child object able move position. there function actual x , y coordinates of symbol on stage?

cheers

you need use css('left') , ('top').

 

example:

var elementleft =  sym.$('ellipse').css('left');

var elementtop = sym.$('ellipse').css('top');

alert('the ellipse @ ' + elementleft + ' left , ' + elementtop + ' top.');

 

2013-05-04 12_17_45-untitled.png

it returns left  , top position example 234px , 20px. need use number interger, need parse it.

 

or ytou can use position():

 

var positiont = sym.$('ellipse').offset().top;

var positionl = sym.$('ellipse').offset().top;

alert(positiont + ' , ' + positionl  );

 

2013-05-04 12_27_30-untitled.png

this returns integers without px no need parse.



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