Hi
I’ll start with the basics. I have a 5 page site made so far. On one of the pages I have a subpage and on this subpage is a video. The code I am trying to write is to stop this video playing whenever any of the other page links are clicked on the top. Im using flash by the way. Don;t know how to put a prefix in the thread title sorry
The code I am using is:
home.addEventListener(MouseEvent.CLICK, stopVideoSound);
function stopVideoSound(event:MouseEvent):void {
videoClip.volume = 0
}
videoClip is the instance name I have given my video and home is just one of the page links. I haven’t written the others in yet. When I preview this though I keep getting this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at assignmentinwork_fla::MainTimeline/stopVideoSound()
‘assignmentinwork_fla’ is the file name but I can’t seem to work out what the rest means or how I would fix this so the video stops when teh subpage is clicked out of.
Thanks for any advice. I’m really at a dead end here.
Much appreciated if you need any more info with what I’m working with then feel free to ask.