mc hierarchy rearrangement  
Author Message
joox





PostPosted: 2004-2-5 21:32:22 Top

flash-actionscript, mc hierarchy rearrangement can i alter hierarchial links of mc's?
say i have an mc named "pea" attachMovie'd to mc "can". "can" in turn, attachMovied to "table", which is on _root. Can i get that "pea" into mc "fork" on _root (i need that pea be moving together with fork AND be above all other peas and cans in depth stack).

i did try _root.table.can.pea._parent = _root.fork and it does the assignment, but does not rebuild hierarchy, means i still can't move the pea together with fork. what should i do?

thanks


 
kglad





PostPosted: 2004-2-5 22:36:00 Top

flash-actionscript >> mc hierarchy rearrangement you can't directly move pea from table.can to fork but you can attach another instance of pea to fork and if you no longer want a pea instance attached to table.can, you may remove it. and you can control the depth of pea by using swapDepths() or otherwise tracking the depths of your objects.


 
joox





PostPosted: 2004-2-5 23:02:00 Top

flash-actionscript >> mc hierarchy rearrangement well kglad thanx for the answer but if it was that simple i wouldn't bother u guys :)

actually there are no peas no cans no forks. there are complex dynamically created mc's with loads of attachMovie'd stuff, so i can't simply create a new instance of a "pea" - cuz it will create a virgin one, without the stuff attached to it's "original"

swapDepths could only work with "peas" within one "can" , but i need that "pea" in front of all "cans" - that's why i tried to put that "pea" onto the "fork" which is above all "cans"

i thought that changing _parent could work cuz _parent is not stated read-ony in flash help, and the only change in inernal flash structure this would require is simple changing of a pointer in child object, and corresponding simple update in parent's child pointers chain.