I tried it this way:
Child1.swf:
var SN = 3;
btn1.addEventListener(MouseEvent.CLICK, nextPage5);
function nextPage5(e){
MovieClip(parent.parent).nextPageAlt();
}
Main.swf:
function nextPageAlt():void{
var mc = MovieClip(loader.content);
mc.goToFrame(SN);
}
But it didn´t work... I got following warning:
ReferenceError: Error #1065: Variable SN is not defined.
at sourceCS3_fla::MainTimeline/nextPageAlt()
at UI_fla::MainTimeline/nextPage5()
I thought by your earlier reply you meant you were taking the OOPC route (I've no bias either way). That's why I suggested reaching into the child. But if you're going the parent route, then you should be able to just pass the variable in the function call.
Child1.swf:
var SN = 3;
btn1.addEventListener(MouseEvent.CLICK, nextPage5);
function nextPage5(e){
MovieClip(parent.parent).nextPageAlt(SN);
}
Main.swf:
function nextPageAlt(SN):void{
var mc = MovieClip(loader.content);
mc.goToFrame(SN);
}
To go the reaching in route you would need to target the loader.content of the child and get the SN variable that way.