Problem with Actionscript 3. Access of undefined property.

New Here ,
Dec 16, 2020 Dec 16, 2020

Copy link to clipboard

Copied

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

Views

112

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Dec 16, 2020 Dec 16, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.png

 

 

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Dec 18, 2020 Dec 18, 2020

Copy link to clipboard

Copied

LATEST

Hi.

 

Can you share your FLA so we can investigate it?

 

Regards,

JC

Likes

Translate

Translate

Report

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