My main timeline is set up with a movieclip with an instance name of mainContent that loads an external swf that contains a movieclip with an instance name of subContent that I want to load another external swf into.
How can I control this from my main timeline.
I have two buttons on the main timeline, a next button and a previous button. I’m storing all external file references into Arrays so I can navigate through the entire presentation using the next and previous buttons.
Here’s the AS I have so far:
// Main sections
var section_1 = "injectionSystem.swf";
// Sub Sections
var section_1_1 = "injectionSystemS1_1.swf";
var section_1_2 = "injectionSystemS1_2.swf";
var section_1_3 = "injectionSystemS1_3.swf";
// Global variables declared so they work in functions throughout the movie.
var nextURL;
var prevURL;
var Address;
var SubAddress;
var SectionOne:Array = [section_1, section_1_1, section_1_2, section_1_3];
var SectionTwo:Array = [section_2, section_2_1, section_2_2];
var SectionThree:Array = [section_3, section_3_1, section_3_2];
var SectionFour:Array = [section_4, section_4_1, section_4_2];
var SectionFive:Array = [section_5, section_5_1, section_5_2, section_5_3, section_5_4, section_5_5, section_5_6, section_5_7];
var SectionArray:Array = [SectionOne, SectionTwo, SectionThree, SectionFour, SectionFive];
var mainContentLoader:MovieClipLoader = new MovieClipLoader();
//
function _1() {
Address = 0;
mainContentLoader.loadClip(SectionArray[Address][0], mainContent);
mainContentLoader.loadClip(SectionArray[Address][1], **mainContent.subContent**);
trace(SectionArray[Address][1]);
}
function _2() {
Address = 1;
loadMovie(SectionArray[Address][0], mainContent);
}
function _3() {
Address = 2;
loadMovie(SectionArray[Address][0], mainContent);
}
function _4() {
Address = 3;
loadMovie(SectionArray[Address][0], mainContent);
}
function _5() {
Address = 4;
loadMovie(SectionArray[Address][0], mainContent);
}
_1();