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.');
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 );
this returns integers without px no need parse.
More discussions in Edge Animate CC
adobe


Comments
Post a Comment