I have created a lesson book using flash where every unit has many chapters. Their is a combo box to navigate in between the chapter. Those chapters are placed into individual frame. Now, if each chapter is a different .swf file (or HTML flash file if the publish preview is HTML), how can i access them through combo box? here is my code for combo box to navigate in between frame:
stop();
combobox.addItem( {label: "Chapter 1" } );
combobox.addItem( {label: "Chapter 2" } );
combobox.addItem( {label: "Chapter 3" } );
combobox.addEventListener(Event.CHANGE, changeFrame);
function changeFrame (event:Event):void{
if (combobox.selectedItem.label == "Chapter 1")
gotoAndStop ("chap1");
else if (combobox.selectedItem.label == "Chapter 2")
gotoAndStop ("chap2");
else if (combobox.selectedItem.label == "Chapter 3")
gotoAndStop ("chap3");
}
any help please? thank you!
Make a function that will load a swf, and display it on the screen.
Then call the function using the change event
You will then need to add in an if statement or something to check whether you need to remove a chapter that has already been loaded.