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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:24:52+00:00 2026-06-14T17:24:52+00:00

I made a flash game where you fly a plane and you have to

  • 0

I made a flash game where you fly a plane and you have to grab circles and avoid parachutes and stuff. Here is a screen of the game for you to understand what im talking about:

Game Screenshot

The problem that i have is the memory usage because i want to migrate it to iphone with air. When im in a menu there is no problem, the aplication uses around 40 mb. But when im playing the memory goes up like an arrow. I took a screen of the Monster Debugger graphic. Here it is:

Memory Usage Screenshot

The thing is that i have various classes for each elements that fall from the sky. for the parachutes, for the surfers, for the lines of circles and for the bonuses. They are all pretty simmilar so i will copy only the parachutes class that is this:

package  {

    import flash.display.MovieClip;
    import flash.utils.Timer;
    import flash.events.*;
    import ascb.util.NumberUtilities;
    import myGlobal;
    import flash.geom.*;
    import com.demonsters.debugger.MonsterDebugger;


    public class paracaidistasClass extends MovieClip {

        private var n:Number = 0;
        private var _rotacionDelAvion:int = 1;
        private var temporizador:Timer=new Timer(myGlobal.paracaidistasTemporizador[myGlobal.nivel - 1],0);


        public function paracaidistasClass() {
        // constructor code 
        temporizador.start();
        temporizador.addEventListener(TimerEvent.TIMER, emisor);
        addEventListener(Event.ENTER_FRAME, altura);
        }

        private function altura(e:Event):void{
        if (myGlobal.detener == false){
            this.y = this.y - myGlobal.altura;
        }
        }

        private function emisor(e:TimerEvent){
            if (myGlobal.detener == false){
                        temporizador.delay = NumberUtilities.random(myGlobal.paracaidistasMinimoDelay[myGlobal.nivel - 1], myGlobal.paracaidistasMaximoDelay[myGlobal.nivel - 1]);
                        var paracaidista = new paracaidistaClass;
                        this.addChildAt(paracaidista, 0);
                        paracaidista.y = NumberUtilities.random(-350,50);
                        myGlobal.cantidadDeParacaidistas = this.numChildren;
                        addEventListener(Event.ENTER_FRAME, movimiento);
            }
        }

        private function movimiento(event:Event):void{
if (myGlobal.detener == false){
                for (var i:Number=0; i<this.numChildren;i++){
                    getChildAt(i).x = getChildAt(i).x - (myGlobal.velocidad - (pasarAPositivo(myGlobal.rotationDelAvion) / 12));
                    getChildAt(i).x = getChildAt(i).x - 1;
                    if (getChildAt(i).localToGlobal(new Point(stage.x,0)).x < -200){
                        removeChildAt(i);
                        myGlobal.cantidadDeParacaidistas = this.numChildren;
                    }
                }
}
//delete all parachutes
        if (myGlobal.reiniciar == true){
            for (var d:Number=0; d<this.numChildren;d++){
                        removeChildAt(d);
                        myGlobal.cantidadDeParacaidistas = this.numChildren;
            }
        }
        }

        private function pasarAPositivo(value:int):int{
            var _rotacionPositiva:int;
            _rotacionPositiva = value;
            if (_rotacionPositiva < 0){
                _rotacionPositiva = _rotacionPositiva * -1;
            }
            return _rotacionPositiva;
        }

    }

}

Well. Ass you can see i delete the parachutes that are out of stage or hit so the memory usage should stabilize in some poin. I also check and i never pass the 3, 4 children of parachutes. So, i dont understand why only when y remove the entire class that is at the end of the level the memory drops and why it isnt stable and keeps growing when y remove the childs that im not using. I hope y was clear enought and someone knows whats the problem. Thanks in advance.

  • 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-06-14T17:24:54+00:00Added an answer on June 14, 2026 at 5:24 pm

    Not sure exactly what’s going on in the emisor Timer callback, but your adding an eventListener every time the conditions are met. If it is one for every parachute, then you don’t remove that eventListener anywhere. You really only need one ENTER_FRAME eventListener for the whole app and just have that update the child classes.

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

Sidebar

Related Questions

Currently I have made a flash/as3 Snake game which I want to somehow make
I have a game made by Flash CS5 ActionScript3. I want to create a
I have made a flash game for facebook. All happened right expect when I
I have made a website and put inside it a flash game. For people
hey all, I have made a socket server in C# for a flash game
I have a Flash game I made way back in 2008. It runs super
I already made a game with flash builder 4, and I want to provide
I have made a flash application and in this flash application I have included
Hey here is my problem : i made a flash and i can`t change
I have made a code that read data from flash Nand (without filesystem). fd

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.