Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Navigate to URL help

Guest
Oct 25, 2014 Oct 25, 2014

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!

TOPICS
ActionScript
237
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 25, 2014 Oct 25, 2014

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 25, 2014 Oct 25, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 26, 2014 Oct 26, 2014
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines