Today I went to go set up the FlashTracer extension for firefox. Normally I don’t use firefox, i was just going to use it for that specific plugin so I could view the trace stements while my swf was in the browser. I couldn’t actually get it to work, so I started looking around and found this post which had pretty much all the info I needed. There’s a lot of info on that page, but it turns out it’s a pretty easy task:
- Get the debug player if you don’t have it already.
- run this command in the terminal, just be sure to replace ‘username’ with your actual username :
tail -f /Users/username/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt
There was some info in the other post about creating and editing a file named ‘mm.cfg’, but I already had that installed (maybe because I already had and ran the debug player?) so I didn’t need to do anything with that.
I saved the command from Terminal as a file so I can just double-click on it and run that command:

To make it a little easier to view the output, I went and grabbed a small app named Afloat, which allows you to specify that a window should always remain on top. This way i don’t have to constantly switch between the browser and the terminal window.
[[ Whoops….]]
*Update:
I just wanted to throw a list of some of the issues we encountered, maybe having it out there will help someone else.
- Flash doesn’t append session data to file uploads.
- Flash stroke draws from the center of the line. This means that if you have a square with a 10 point stroke, the stroke will be 5 pixels on the outside of the square and 5 pixels on the inside. Since we needed precise coordinates and measurements, this became a pretty glaring issue, since (i think) java’s drawing tools didn’t work that way.
- TextFormat.getTextExtent() is pretty wacky. Even though we had embedded the fonts, it would return different values if you had the font installed or not, even if you were using the same machine with which you embedded the font in the first place. I read somewhere that in fact flash will get the values from the font file first if it is installed.
- Dynamically loading fonts in flash just sucks. I went with the process discussed in the comments at http://oddhammer.com/index.php/site/comments/shared_fonts_for_flash/. Look for comment #3, by Matt.
- Getting the _width and _height of a rotated movieclip returns the width of the bounding box area of the movieclip, not the actual width and height of the movieclip.
There’s a bunch more that will get added to the list as I remember them.
Anyone have any idea about this? We are having issues where it appears that the windows version of the flash player is not using the embedded version of a font if that font is already installed on the computer. Does anyone know if this is actually the case?
We are also using getTextExtent() to find the baseline of the font to send that info to a java backend. I think there might be an issue here as well.
*Update: as far as we can tell, t’s an issue with getTextExtent using the font installed on the system rather than the embedded font. wtf?
I finally learned how important this concept is when you are programming. Coming up as a flash developer, on of the things you learn quickly and get very used to, is how easy it is to break encapsulation on your objects and ‘hack’ things. I’ve said before I’m a big fan of just getting the stuff done and to not worry about strict OOP concepts. However, on this project I am currently trying to wrap up, I am experiencing first hand the other side of that issue…namely, the ripple effect that poor encapsulation can have on your code. Too many times, fixing one bug is breaking something else. Granted, that could’ve been caused by introducing an entirely new way of trying to accomplish something that needed to get done in the late stages of a project…but properly written interfaces would’ve saved a lot of work (and stress).
The way I’m seeing it now, therea re some projects that you can get away with sloppy encapsulation (websites) and some you WILL get your ass bitten with (applications). From now on, it’s a well-defined interface for objects and classes for me.
SaveNetRadio.org - One of the things I really enjoy about programming is throwing on some headphones and getting down to business. Most of those times I listen to internet radio, and I’ve discovered a lot of great music I never would have otherwise (even whole genres I would have never really discovered). Well, thats about to come to an abrupt end, with a new law about to go into effect increasing the royalty fees for internet radio broadcasters by 300 - 1200% (according to SaveNetRadio.org), which will effectively shut them down immediately. If you care about this issue at all, head on over to SaveNetRadio.org and see what you can do to show some support.