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

ActionScript, Scene, and Camera Errors

Community Beginner ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

Hello,

 

Recently, I had a problem with my Adobe Animate project that had to do with the scenes, my ActionScript code, and my camera. Ever since I added my buttons for the "Intro" scene, things started to get weird. I got ActionScript output errors stating my Dream and Room scenes don't exist, a lot of ActionScript #1120 errors on my Room and Dream buttons, and even my camera not working in the Room scene. I don't know why, but when I try to change some segments of my code, the errors persist. Is it because Adobe Animate updated, there are errors in the Camera functions, or even the code itself is outdated? I have no clue what's going on, and I hope to find a solution to it. Furthermore, I'm new to ActionScript so I don't know a lot about it. The code snippets were extracted from our textbook. I am also using version 24.0.3 of Adobe Animate 2024.

Here is my file:

https://drive.google.com/file/d/111jUH0po1h_u4BN4b1iYCd14qw6VS_on/view?usp=sharing


With regards.

TOPICS
ActionScript , Code , Error , Other , Product issue , Timeline

Views

512

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
Community Expert ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

fix the first error and then retest. once the first error is fixed, work on the second error etc.

Votes

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
Community Beginner ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

Hi kglad,

 

I fixed the #1120 ActionScript error since I didn't state an Instance name on my button symbol but after I fixed that, a new error appeared on my first scene:

GeneralFlipHax_0-1716430777293.png

Is there a way I can fix this? I tried renaming the instances and rearranging my scenes but nothing happened. Any thoughts or solutions?

With regards.

Votes

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
Community Expert ,
May 22, 2024 May 22, 2024

Copy link to clipboard

Copied

in your publish settings, tick "enable debugging" and re-test.  the error line number will be listed.

 

copy and paste here the few lines around the line with the error, along with the top of the error panel.

Votes

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
Community Expert ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Hi.

 

You have two types of issues:
1 - Functions with the same name in the first two scenes. Give the duplicates different names;
2 - As you're using advances layers, you need to use the layer name as a prefix. For example: Buttons.dreamButton instead of only dreamButton.

Also please make sure to test your movie by using Ctrl + Enter (Cmd + Return) to test the whole movie and not Alt + Ctrl + Enter (Option + Cmd + Return) to test the current scene only.

 

I hope these tips help.

 

Regards,

JC

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Hello JC,

 

This eventually worked naming the buttons as different instances and I realized I used the shortcut to render a SINGLE scene instead of the whole movie. The only thing left is my Camera layer. The camera layer won't follow the tween and my buttons keep displaying Error #1120 in ActionScript. Could this be a bug in Adobe Animate, I've never seen anything like this before...

 

With regards.

Votes

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
Community Expert ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

copy and paste here the error message and the line of code triggering the error plus a few lines above and below that line.

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

This is what it shows when I have a Camera layer on top of all layers in the second scene:

GeneralFlipHax_0-1716499779865.png

And this is what it shows when I remove the camera from my scene:

GeneralFlipHax_1-1716499844152.png

I hope this helps!

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Furthermore, here is my code snippet:

GeneralFlipHax_0-1716499963136.png

 

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Sorry, I forgot to calrify... When I have the camera layer in my scene, it displays ActionScript errors in the current scene and the scene after it. The ActionScript error is #1120. However, when I remove the Camera layer from the current scene, everything seems to be working fine. I don't know if it's a bug or something wrong from my side.

I hope this helps.

Votes

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
Community Expert ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Actually the functions that are duplicated.

 

Anyway, here is a working version.
https://drive.google.com/file/d/1uVOk6UkyyplLupSPsoOaMTASu0Hr7U5y/view?usp=sharing

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Hello JC,

 

Thanks, for some reason, it's working now! Although I'm curious, what did you do in the second scene that made the Camera work, and avoid the #1120 ActionScript error?

 

with regards.

Votes

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
Community Expert ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Great.

 

It's because in that scene one of your buttons is called introButtonRoom but in your code it was called introButton only. Forgot to mention that.

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Hello again JC,

 

I already renamed my buttons but the error is still showing when I have the Camera present. Below is a video demonstrating the difference between 2 projects.

 

Below is a video demonstrating this. I hope this helps!

With regards,

Votes

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
Community Expert ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Thanks for the video.

 

As you're using advances layers, you need to use the layer name as a prefix in your code. For example: Buttons.dreamButtonRoom instead of only dreamButtonRoom.

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Hello again JC,

 

I've fixed those errors on my side of the project, but one new error popped up. It's the button to toggle the subtitles on and off. Every time I press the button, this pops up in the Output window:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at AnimationProject_JC_Dream_fla::MainTimeline/toggleClipVisibility()

 Is there a way to fix this too?

 

With regards.

Votes

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
Community Expert ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

The same as before: you need to prefix the layer's name.

So subtitlesLayer.dreamSubtitles instead of just dreamSubtitles.

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

Good day JC,

 

I've already fixed the discrepancies in the third scene. However, the buttons in my second scene aren't working anymore. I've had the same code, the same layer progression, and the same orientation. There are no output errors and the code is correct in syntax. Any solutions to this problem? below is another video of what I'm experiencing so far:

 

With regards.

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

UPDATE: In the other Animation file I tested on, I got this error. Is there a solution to this error?

TypeError: Error #1010: A term is undefined and has no properties.
	at AnimationProject_JC_fla::MainTimeline/frame504()

Votes

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
Community Beginner ,
May 23, 2024 May 23, 2024

Copy link to clipboard

Copied

UPDATE: Never mind, it was a basic type error in the other file and I have that fixed, but the problem still persists for me. The buttons wont move to the next scene.

Votes

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
Community Beginner ,
May 24, 2024 May 24, 2024

Copy link to clipboard

Copied

UPDATE: I've looked into some possibe reasons why the buttons aren't working and maybe I need to reformat my button placements so I guess I'll try that.

Votes

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
Community Beginner ,
May 24, 2024 May 24, 2024

Copy link to clipboard

Copied

Hello JC,

 

I've tried all the solutions that were reccomended from other forums but none of them worked? So I guess there isn't no known solution to this problem so I'll just pass my whole project as a malfunction within the program for now.

Votes

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
Community Expert ,
May 24, 2024 May 24, 2024

Copy link to clipboard

Copied

What do you need to fix now? Do you have an updated FLA?

Votes

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
Community Beginner ,
May 24, 2024 May 24, 2024

Copy link to clipboard

Copied

Hello JC,

 

Here's an updated version of my project.

https://drive.google.com/file/d/1S-ktMzzm7STuj-6bJJffbqiHHrdCyEuF/view?usp=sharing

 

I hope this helps!

With regards.

Votes

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
Community Expert ,
May 25, 2024 May 25, 2024

Copy link to clipboard

Copied

Hi again.

 

Thanks for the file.

 

Here is a fixed version:
https://drive.google.com/file/d/1dXK9PhKzNhj6LN7qTXO41h4j4-clRdvY/view?usp=sharing

 

So it seems there's something in front of your buttons the are preventing them to be clicked. I'm not sure what. Maybe it's an issue of the advanced layers. To fix the problem I sent the two buttons to the top of the display list using the addChild method.

 

Another thing that I noticed in your file is that the Hit frame of the buttons are not set. You should do it so that the hit area is well defined and the mouse cursor won't keep blinking.

Lastly, using the Camera tool and thus advanced layers makes things much harder and more prone to bugs. I would simulate a camera scaling a parent container or using a custom AS3 VCAM that you can find Googling it.

 

Regards,

JC

Votes

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