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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:52:28+00:00 2026-05-23T11:52:28+00:00

I have a flash file where the first frame contains two buttons, one of

  • 0

I have a flash file where the first frame contains two buttons, one of which takes the user to the second frame, and the other takes them to the third frame. At each of those frames, various text fields and variables can be manipulated via SimpleButtons. Both Frame 2 and Frame 3 have “back” buttons to take them back to Frame 1.

Currently when the user navigates back to Frame 1 for the second time (thus playing it for a third time), my second button appears to no longer exist, and I receive an error. Both buttons on Frame 1 were placed via the Flash IDE. Why is my button popping out of existence, when it did perfectly fine the previous two times? Below is my code for Frame 1. The “back” buttons simple remove event listeners and then call gotoAndStop(1)

var inited:Boolean;
var cache:SharedObject;
var libsans:Font = new libsansreg();

this.addEventListener(Event.ENTER_FRAME, frameEnter);
stats.addEventListener(MouseEvent.CLICK, statsclicked);
modules.addEventListener(MouseEvent.CLICK, modsclicked);

function initcache():void
{
    this.cache = SharedObject.getLocal("RPG_Shooter")
}

function frameEnter(e:Event):void
{
    if (!inited)
    {
        inited = true
        initcache()
        this.gotoAndStop(1)
    }
}

function statsclicked(e:MouseEvent):void
{
    this.removeEventListener(Event.ENTER_FRAME, frameEnter)
    stats.removeEventListener(MouseEvent.CLICK, statsclicked)
    modules.removeEventListener(MouseEvent.CLICK, modsclicked)
    this.gotoAndStop(2)
}

function modsclicked(e:MouseEvent):void
{
    this.removeEventListener(Event.ENTER_FRAME, frameEnter)
    stats.removeEventListener(MouseEvent.CLICK, statsclicked)
    modules.removeEventListener(MouseEvent.CLICK, modsclicked)
    this.gotoAndStop(3)
}
  • 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-23T11:52:28+00:00Added an answer on May 23, 2026 at 11:52 am

    I actually had similar problem at one point. It has to do with garbage collection which is not the best in Flash to begin with, but the IDE’s compiler settings make it so much more insane. There are a couple of tricks you can try which might help.

    • Make sure you remove all listeners before leaving the frame.
    • Go to a “blank” frame (something which still has a background and styling, but no interact-able components) for even a 5/1000 of a second
    • Set the variable names to “null” on frame one (so if your component on frame 3 is named “foo” put foo = null on frame one)
    • put var foo:MovieClip on frame 1. repeat for all MovieClips which you might be using that are named ahead of time.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small flash file that just loads and shows one image scaled
I have two Flash Builder projects. Let's call them MainWeb and MainAIR. MainWeb defines
I have a flash file that has three main buttons on top. When a
I have a flash file menu i am having problem while link it to
I have a flash file that displays the server respone on screen. The respone
On a page i have a flash file. I click it once to start
I have a Flash .fla file that has SimpleButton. That SimpleButton is basically a
I have this swf (flash) file that provides the json that needs to be
I have 2 actions in a Flash file that I would like to test
I have an projector file/Flash application that I need to turn into an interactive

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.