Search code examples
actionscript-3actionscriptflash-cs4movieclip

accessing movieclips within a movieclip from the main timeline


Ok i have a mc called dracoplay and inside is another mc called Drakep and inside that there is another mc called wing and head as you may have guessed they make up a dragon. So dracoplay is the character that gets coded, it moves, breathes fire, etc. etc. Drakp is the body and the head and wing have animations. I have one problem i have no clue whatsoever how to make access Drakep/*head*/wing from the main timeline.


Solution

  • You can access children directly through dot notation like so:

    dracoplay.Drakep.head

    dracoplay.Drakep.wing

    Assuming that "Drakep", "head", and "wing" are instance names and not library asset names. If they are library asset names, then give those clips instance names and use those instance names to access them.