Skip navigation
Currently Being Moderated

How to check memory usage of a debug.

May 12, 2012 4:55 PM

I am new to flash, sorry for any newbishness on my part.

 

Is there a way to track how much memory your debug is using?  I am trying to make a game, and I have 2 ways of doing something.

 

One with an array of square objects doing hitTest, and the other with only 1 object and an array of cords doing a nested if{}.

 

I want to see what each of these are doing in terms of memory usage during runtime and which one would be better.

 

(added)

Specificly not just which one of these is better, but also as different things are applied, I want to test how each of these things responds and which one would slow down a computer less.  And later on as things progress I want a way to test it.

 
Replies
  • Currently Being Moderated
    May 12, 2012 7:04 PM   in reply to ImperialUser

    I don't think you can do it in AS2. But you can use System.memory in AS3. So you can make an AS3 file that loads your games and checks memory usage. Not the easiest, but effective.

     
    |
    Mark as:
  • Currently Being Moderated
    May 12, 2012 9:13 PM   in reply to ImperialUser

    Yes, AS3 is very different than AS2. If you don't have a very specific reason to learn or do AS2 I would suggest moving to AS3. However if you can't or won't redo your game in AS3 there is no problem loading an AS2 project into AS3 — especially for this purpose.

     

    Here is a tutorial on how to load a file using AS3. http://www.ilike2flash.com/2009/11/load-external-swf-in-as3.html

     

    And here is how to check the memory: http://blog.pixelbreaker.com/actionscript-3-0/as30-memory-monitoring (you will probably want to send the value to a textfield or something so that you won't have to rely on a lot of traces).

     
    |
    Mark as:
  • Currently Being Moderated
    May 14, 2012 5:56 PM   in reply to ImperialUser

    If you are new to Flash and have no specific reason to learn AS2 then, by all means, you should just start with AS3!

     

    Not really sure what you mean by "the debug session" but it is what it is. You can publish small isolated tests to see what is going on, but in the end all your stuff is going to play together, so it is good to also see if things are interfering with each other or what have you.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points