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 197599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:52:00+00:00 2026-05-11T16:52:00+00:00

In frame 1 of a very simple flash file, I have the following code:

  • 0

In frame 1 of a very simple flash file, I have the following code:

stop();
this.addEventListener(MouseEvent.CLICK, function(e) { gotoAndStop(5); });
gotoAndStop(10);

When I run the flash file, I expect that it would automatically step to frame 5 (ED. we think he means frame 10), but it does not. However, clicking anywhere does cause it to step to frame 5. The question is, why does gotoAndStop work from within the event handler, but not on its own on the main timeline?

Furthermore, if I put the exact same code on any other frame, gotoAndStop fires in that frame without having to be clicked. It appears gotoAndStop only fails to work on frame 1.

Edit / Answer: The answer to this one is really stupid, but I’ll put it here in case anyone comes across it in the future. The resulting flash file was 500k, which was just big enough, even locally, to cause the gotoAndStop command to fire before the file was completely loaded. As a result, it couldn’t possibly go to frame 5 or 10 because they didn’t exist yet.

I knew I had to put in a preloader, but it was last on the list of things to do, and apparently, that came back to bite me in the ass. I added the gotoAndStop to an Event.COMPLETE handler and it works perfectly. Problem solved.

  • 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-11T16:52:01+00:00Added an answer on May 11, 2026 at 4:52 pm

    Could it be that you don’t actually have a frame 10?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this very simple code or at least i think it's simple. //
I have a very simple problem. I have a data frame with multiple rows
Very inexperienced with Flash, but I hope this is simple enough for someone to
very simple basic question I have only route: routes.MapRoute( Widget, // Route name Widget/Frame/{postUrl},
I have a very simple flash movie. 24 png images in the Library The
This could be something very simple but I'm totally confused. I have a JScrollPane
This seems like a very simple problem, but I cannot get a scrollbox to
I have a very simple Swing GUI with just a JTetxtArea. I am trying
I am working on a very simple game in Flash. I want to make
Some issues with the Flash Bone Tool are described very well in this YouTube

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.