Trying to go back to frame 1 at end of FLVPlayback video
This should be super easy, but I've spent hours searching the web and trying different approaches and I can't get it to work. Can anyone help?
I have 2 frames
1. Frame 1: a static image with a play button
2. Frame 2: an flv video (FLVPlayback instance named FLVvideo)
The code I have allows the user to click the button on the first screen to start the video.
When the video ends, I want it to automatically go back to frame 1.
On frame 1, I have AS3 code that does everything except go back to the first frame. The FLVvideo.addEventListener(VideoEvent.COMPLETE, moveOn); gives a #1009 error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at health_reform_2_fla::MainTimeline/frame1()
This is the code:
stop()
import fl.video.FLVPlayback;
import flash.events.Event;
import fl.video.VideoEvent;
play_button.addEventListener(MouseEvent.CLICK, fl_ClickToPlayVideo);
FLVvideo.addEventListener(VideoEvent.COMPLETE, moveOn);
function fl_ClickToPlayVideo(event:MouseEvent):void
{
gotoAndStop(2);
}
function moveOn(event:VideoEvent):void {
gotoAndStop(1);
}
