actionscript 3 - How to Use Parent in an Array? -


i want set coordinates of movieclips. it's shows movieclips based on their own origins. think have use "parent". here's code:

...     d2: {         piece: wp1_txt,         pieceloc: {             parent.x: "147",             parent.y: "297"         }     },  ... addchild(squarearr.d2.piece); squarearr.d2.piece.x = squarearr.d2.pieceloc.parent.x; squarearr.d2.piece.y = squarearr.d2.pieceloc.parent.y;  tweenlite.to(currentpiece, 0.3, {x:squarearr[newsquare].pieceloc.parent.x, y:squarearr[newsquare].pieceloc.parent.y, ease:linear.easenone, oncomplete:ismovingfunction}); 

above code (without parent) moving textfield out of stage. when set x , y 0, textfield remaining it's own position instead of appearing on top left.

try localtoglobal function http://help.adobe.com/en_us/as2lcr/flash_10.0/help.html?content=00001320.html coords of child relative parent. if want use global coords localtoglobal/globaltolocal option.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -