How to (correctly position) childSymbols on mouse click.


hi folks,

 

i found tutorial here for how create childsymbols on mouse click , works fine - long doing on main stage.

 

here code:

 

var circle = sym.createchildsymbol("flower", "rectangle");

 

var circleelement = circle.getsymbolelement();

 

var posx = (e.pagex- ($(circleelement).width()/2)) + "px";

var posy = (e.pagey- ($(circleelement).height()/2)) + "px";

 

sym.$(circleelement).css({"position":"absolute", "top":posy, "left":posx});

 

 

 

i wanted create childsymbols on premade symbol have called 'rectangle'. works long symbol 'rectangle' same size stage or @ least placed @ top left of screen.

 

however if move symbol 'rectangle' away 0,0 coordinates child symbols appear offset distance 'rectangle 0 point.

 

any ideas on how keep child symbols want them on rectangle? tried calling childsymbol this:

 

var circle = sym.createchildsymbol("flower", "stage");

 

and keeps symbols should be, reason has performance lag , means can't click within bounds of generated childsymbol.

 

any appreciated!

 

thanks,

 

tom

hey folks, thought i'd bump question onto teh forum incase anybosy had ideas on how might go solving it.

 

thanks!

 

tom



More discussions in Edge Animate CC


adobe

Comments

Popular posts from this blog

Joomla 3.3 Installation Error message - Joomla! Forum - community, help and support

Multilanguage infinite redirect loop error. - Joomla! Forum - community, help and support

trim media limit reached