Hi,
Please help… I’m working on a slide show which I would like work automatically (fade in and out) as well as being able to be prompted to switch via buttons… I know this is a super simple thing, but I cannot get all the buttons to work. The buttons are copies of the same instance with different instance names and are located at the 3 respective frames in timeline where the pieces of slideshow should fade in/out ( I hope this makes sense) I get the first set of buttons to work:
import flash.events.MouseEvent;
controls.bttn1.addEventListener (MouseEvent.CLICK, clickSection1);
function clickSection1 (evtObj:MouseEvent) {
// trace shows what’s happening in the output window
trace (“The Button 1 was clicked!”)
gotoAndPlay(“bttn1”);
}
controls.bttn2.addEventListener (MouseEvent.CLICK, clickSection2);
function clickSection2 (evtObj:MouseEvent) {
// trace shows what’s happening in the output window
trace (“The Button 2 was clicked!”)
gotoAndPlay(“bttn2”);
}
controls.bttn3.addEventListener (MouseEvent.CLICK, clickSection3);
function clickSection3 (evtObj:MouseEvent) {
// trace shows what’s happening in the output window
trace (“The Button 3 was clicked!”)
gotoAndPlay(“bttn3”);
}
but when I add more buttons that are located later on in a timeline, I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at INDEX_TEST_r3_fla::MainTimeline/frame1()
I hope this makes sense - I’d REALLY appreciate any help
Thank you!