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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:22:12+00:00 2026-05-23T15:22:12+00:00

I have a MovieClip on the main timeline on frame 5. It’s called slideShow_mc.

  • 0

I have a MovieClip on the main timeline on frame 5. It’s called “slideShow_mc”. I also have the following code

function startSlideshow():void {
    slideShow_mc.loadSlides(loadXml.xmlArray);
}

Inside slideShow_mc I call a custom class:

function loadSlides(xml_file:Array):void
{
    var slides:SlideShow = new SlideShow(xml_file);
    addChild(slides);
    slides.x = 0;
    slides.y = 0;
}

If I go to other frames slideShow_mc disappears but the trace statements in the SlideShow class tell me that it’s still there. How do I remove it? trace(slideShow_mc.numChildren) returns 0. trace(numChildren) inside the loadSlides method returns 0 as well.

  • 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-23T15:22:13+00:00Added an answer on May 23, 2026 at 3:22 pm

    All you are doing by moving to another frame is removing the slider from the stage. If it contains internal listeners that are receiving events then you need to shut those down. You could try listening for the removedFromStage event inside slideShow_mc and then calling a destroy function on your slider.

    //inside slideShow_mc:
    //define slides in a wider scope so we can kill it later:
    var slides:SlideShow;
    //listen for this container being removed
    this.addEventListener(Event.REMOVED_FROM_STAGE,onRemoved);
    //load slide function
    function loadSlides(xml_file:Array):void
    {
        slides = new SlideShow(xml_file);
        addChild(slides);
        slides.x = 0;
        slides.y = 0;
    }
    //remove handler
    function onRemoved(evt:Event):void
    {
        this.addEventListener(Event.REMOVED_FROM_STAGE,onRemoved);
        if(slides != null) {
            //call a function in the SlideShow class to kill its internal workings
            slides.destroy();
            //free up the object for gc
            slides = null;
        }
    }
    

    Obviously slides.destroy() is conjecture on my part. There may be a function in your class that shuts down its behaviour, or you might have to create one, and it may not be named destroy.

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

Sidebar

Related Questions

I have a movieclip called main, inside of that I have all my layers
I have the following Flash structure. Main Timeline ---test_menu (Movie Clip) ------test_menu_sub (Movie Clip)
very often I like to have my movieclip code inside the movieclip (on a
I am using the following code to tween an movieclip once _global.choiceMade equals 1...
I have a MovieClip with a MouseEvent function associated to CLICK event. Inside of
I have some animation that was created in the main timeline in an FLA
I have this situation where I declare inside my main class a function that
I have Main.fla and SkinA.fla. Both have MovieClip library item: MC_BrandLogo. I'm loading the
I have two classes; my Main class and a class called BlockPlace. I want
I have got two movieclips on the main timeline. First one is envelope_mc and

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.