Code works on one frame but not the other
I have 2 frames in my movie, 2 buttons and a video. On the first frame there is code for button #1. On the second frame i have code for button #2 but I'd also like to appear on the first frame. The problem is that when I put the code for the second button on the first frame, the video won't play. so I can only have it on the second frame. I can't figure out why the code, which works when its on frame 2, then won't work on frame 1. When I put the code on frame 1 it breaks the functionality and the video won't play.
This is the code on frame 1, for button #1 (btn_skip) :
stop();
btn_skip.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_2);
function fl_ClickToGoToWebPage_2(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.brokerschoice.com/Black_Vault/innervault.html"), "_self");
}
import fl.video.MetadataEvent;
mymovie.addEventListener(MetadataEvent.CUE_POINT, fl_CuePointHandler_2);
function fl_CuePointHandler_2(event:MetadataEvent):void
nextFrame();
This is the code on frame 2, for button #2 (btn_skip) : This code works if I put it on frame 2, but breaks the video if I put it on frame 1. I need to have this code on frame 1 as well.
btn_homePage.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_3);
function fl_ClickToGoToWebPage_3(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.brokerschoice.com"), "_blank");
}