Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6642505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:56:18+00:00 2026-05-25T23:56:18+00:00

I am having a problem with AS 3.0 When you click on a door.

  • 0

I am having a problem with AS 3.0
When you click on a door. You’ll move to the next frame.
In the next frame i tried the same. But its not working.

This is the code:

FRAME1;

stop();

deur1.addEventListener(MouseEvent.CLICK, frame2);
function frame2(event:MouseEvent)

    {
gotoAndStop(2)
        }// This part works. I am now in frame 2.

FRAME2:

deur2.addEventListener(MouseEvent.CLICK, frame3);
function frame3(event:MouseEvent)

    {
gotoAndStop(3)
        }

deur1=door1. deur2=door2
The doors are a Buttons.
When i run this project. All i see are all my frames for each FPS.

This is the compile error i get:
Compile errors

Scene 1, layer ‘layer1’ Frame 2, line 1: 1023 Incompatible override

Scene 1, layer ‘layer1’ Frame 2, Line 1: 1021 Duplicate function definition.

Scene 1, layer ‘layer1’ Frame 2, Line 3: 1000 Ambiguous reference to frame2

MainTimeLine, Line2: 1000 ambiguous reference to frame2.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:56:18+00:00Added an answer on May 25, 2026 at 11:56 pm

    You get those Compile errors because of the names you are using for the functions. It seems “frame2” and “frame3” are reserved names. Try to use more descriptive names for your functions, it will help you (and others) to understand your code, and this way you are less likely to run into errors like these.

    Try this (I also corrected the formatting to improve readability):

    On frame 1:

    stop();
    
    deur1.addEventListener(MouseEvent.CLICK, go_to_frame2);
    
    function go_to_frame2(event:MouseEvent):void
    {
      gotoAndStop(2)
    }
    

    On frame 2:

    deur2.addEventListener(MouseEvent.CLICK, go_to_frame3);
    
    function go_to_frame3(event:MouseEvent):void
    {
       gotoAndStop(3)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem with the click() functon. It does not work in Opera.
I am having problem with this error: 'undefined' is null or not an object'
I'm having a problem with a task similar to this one: click (translated) (the
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
I'm having problem selecting an element with an id like this <li =0f:Bactidol_Recorder.mp4>. I
I am having problem with my repeater's OnItemCommand event. When I click the Link
I am having a problem where my button click event is still firing even
I'm having a problem where the undo function (both ctrl+z and right click >
I am having a problem after opening the notepad once I click the button
Im having a problem, I have managed to get some code to make a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.