Navigate to URL help
So I'm using the code below so that if someone clicks on a movie clip, it takes them to a webpage:
MovieClipName.buttonMode = true;
MovieClipName.addEventListener(MouseEvent.CLICK,f) ;
function f(e:Event){
navigateToURL(new URLRequest("http://www.URL.com"), "_self");
}
This is working absolutely perfect for 2/3 movie clips in my library. However, when I try to apply the code to a third movie clip in my library using the exact same code, I get the error: 1120: Access of undefined property MovieClipName3.
I don't understand. The exact same code is working flawlessly for MovieClipName1 and MovieClipName2. Why do I get an error when I try to apply it to MovieClipName3? Thanks in advance!
