[RESOLVED] Referencing a frame on a child from the parent?
I have a frame that I want to display but the function that calls it exists on the parent. How do I call a frame that exists within a child movieclip from its parent?
Here is my code. It is basically for a restart button.
Here is the parent function.
Code:
function restart(event:Event)
{
gotoAndStop("pwrframe");
pwrcomp.SetPwrcomp(false);
sifdcomp.SetSfidcomp(false);
answercomp.SetAnswercomp(false);
readypwroff.SetPwroff(false);
trainingcomp.SetTrainingcomp(false);
numsend.SetNumsend(false);
}
and here is the frame I need to call from the child movieclip. I bolded and increased the size of the line of code for the frame I need to reference.
Code:
function pwrbtn(event:Event)
{
if(trainingcomp.GetTrainingcomp()==true)
{
}
else if(pwrcomp.GetPwrcomp()==false)
{
gotoAndStop("scrnon");
MovieClip(parent).pwrframedone();
pwrcomp.SetPwrcomp(true);
}
//this statement kills the powerbutton until the end.
else if(readypwroff.GetPwroff()==true)
{
gotoAndStop("scrnoff");
MovieClip(parent).offframedone();
}
}
Thanks in advance. Btw if I need to post the entire code just leave a message. I would be glad to do so if it is necessary.