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

Problem with Actionscript 3. Access of undefined property.

New Here ,
Dec 16, 2020 Dec 16, 2020

Hello there. I am new to animating. I have this cartoon I want to add Actionscript to. I am working in Actionscript 3.

 

Here is my code.

 

thescreet.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_8);

function fl_ClickToGoToWebPage_8(event:MouseEvent):void
{
navigateToURL(new URLRequest("https://homestarrunner.com/"), "_blank");
}

 

It keeps giving me the error "1120: Access of undefined property thescreet." for the first line, first word.

 

I have triple checked now and everything is spelled correctly. If anyone could help, it would be a great help.

 

Thanks!

TOPICS
ActionScript , Code
663
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 ,
Dec 16, 2020 Dec 16, 2020

AS3? This isn't for a public web page, is it?

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
Explorer ,
Dec 17, 2020 Dec 17, 2020

Hello Jaxson5C7C, I did the test here with your code and it worked perfectly. Check that you have correctly placed the name on the Button or MovieClip symbol that performs the action, (Remember that the symbol cannot be a "graphic", must be of the type "Button" or "MovieClip" and must be "named" correctly in the "Properties" Panel: https://www.facebook.com/groups/AdobeAnimateTutorials

AS3.pngexpand image

 

 

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
New Here ,
Dec 17, 2020 Dec 17, 2020

It's still not working, I think there's some disconnect between the instacne name and the code.

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
New Here ,
Dec 17, 2020 Dec 17, 2020

Wait: I just turned off strict mode and it fixed it. Thanks!

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
New Here ,
Dec 17, 2020 Dec 17, 2020

Now the code just pauses the animation, what?!?

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
New Here ,
Dec 18, 2020 Dec 18, 2020

In ActionScript settings my options have Strict Mode off, everything else on. It is no longer giving me the error, but it just pauses the animation once you get to there. I'm just going to give up and replace the code with something different for the sake of my sanity!

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
Community Expert ,
Dec 18, 2020 Dec 18, 2020
LATEST

Hi.

 

Can you share your FLA so we can investigate it?

 

Regards,

JC

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