Copy link to clipboard
Copied
Is it possible to parent a layer that is inside a symbol, with another symbol that is in the main scene? For example for some pupils that are inside the eye symbol, control them from a controller in the main scene.
Copy link to clipboard
Copied
layers don't exist once you publish, so you can't do anything with layers outside the ide (like control with code).
otoh, there's no need for that. you can always copy and paste a layer (or layers) into a movieclip timeline and, of course, movieclips are controllable outside the ide (eg, with code including reparenting).
Copy link to clipboard
Copied
If it can be done with the movieclip, I am interested, because a pupil of one eye, does not have so many changes of pose, and if needed, it can be swapped symbol and without problems. Now it is how to make this script.
Copy link to clipboard
Copied
what script?
Copy link to clipboard
Copied
I refer to "code including reparenting".
Copy link to clipboard
Copied
if you're asking for code to reparent a movieclip, as3 or canvas/js?
Copy link to clipboard
Copied
To work with characters, it is better in as3. Currently to use the pupil is to work with two windows, one from the stage and one that is inside the symbol, which is where I move the pupils.
Copy link to clipboard
Copied
use addChild().
for example, if pupils is a child of character and character is a child of the main timeline and you want to reparent pupils from the main timeline (after it exists), use:
newparent.addChild(character.pupils);
note: even though pupils is now a child of newparent, you still reference it (from the main timeline) as character.pupils, not newparent.pupils.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now