cakepizza
asked on
How to change parent/child relationships of existing objects
Is there a way to change relationships of objects in action Script 3.0?
lets say you have 4 object on the screen - Box 1 , Box2, Circle1 and Circle2
Circle 1 is a child of Box1
Circle2 is a child of Box 2
Now I want Circle2 to switch parents, so that is is a child of box1, effectively changing the path I have to take to reference it. Instead of referencing Circle2 as Box2.Circle2 it is Box1.Circle2.
lets say you have 4 object on the screen - Box 1 , Box2, Circle1 and Circle2
Circle 1 is a child of Box1
Circle2 is a child of Box 2
Now I want Circle2 to switch parents, so that is is a child of box1, effectively changing the path I have to take to reference it. Instead of referencing Circle2 as Box2.Circle2 it is Box1.Circle2.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Box1.Circle2=Box1.addChild
Sweet.