Debug issues in Flash CS4
I am at a loss for the proper word, but I am coding in the Flash CS4 [api?] directly and not using anything like flex or eclipse...
I have already coded the login, character gen/select, game creation, and lobby chat and am moving on to the game proper, testing some ideas for displaying transparent tile overlay effects, and having some fun with it, but I want to be sure that the overlay objects I am making and destroying are getting garbage collected properly.
I am keeping ties to them at a minumum, and pushing a reference to them into an array, making all listeners weak, and then clearing the array when the effect is no longer needed. I think that should make them garbage collectable, but I would like to make sure by running some memory testing.
I have two main problems with this when I go to debug mode:
1) I am using URLloader to access php files on a server for all the login, chat, netcode stuff, and this gives me a security error for some reason when I try doing this in debug mode, although it works fine when I test the movie or when I run the swf on the server itself. Is there some security setting I am missing or is this just a shortcoming of debug mode?
2) What is a good/best way to check memory usage? I can't really get to this step due to the problem in 1 above. Maybe I can ignore the debugger and just debug with trace, but is there a way to trace out memory usage?
I am pretty used to debugging with trace, as I have always had horrible luck with the flash debugger, it would usually freeze up or take crazy long (10 minutes or so) to start up my files in flash 8. Or constantly warn me that my code was causing the debugger to run slow, even though my fps without the debugger was 50+