Skip to main content
October 26, 2014
Question

Navigate to URL help

  • October 26, 2014
  • 1 reply
  • 278 views

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!

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
October 26, 2014

Look for a typo in the naming or the code.  Also make sure the code is in the same frame as the movieclip.

October 26, 2014

Thanks for the reply. I have triple checked the spelling in the code and movie clip name. The clip name matches the clip name in the code exactly. The code is in the same frame as the movie clip. The error still persists.

Ned Murphy
Legend
October 26, 2014

Which frame is the movieclip in... is it in a frame just after another frame where the same symbol exists under a different name?