Latest Twitter Update:




Archive for the 'Actionscript' Category

Dynamic Flash Pathing in Firefox versus IE

Monday, August 11th, 2008

Many of you know I’m not a big fan of Firefox, which this post isn’t really about (I have many reasons, many of which are preference). This post is about how I spent about 4 hours last week on a Flash bug that caused a flash game to only work in IE. The game was a legacy game and written by someone else (and I had to fix it), so I had no idea what was causing the issues. Fortunately, with some help of one of my developers on a good debugger, I found that in one of the xml paths, there was a backslash (\) in the path to a SWF that it needed to load in.

Internet Explorer handled it just fine (as it always does), but Firefox had to be a pain in the rear and convert it to %5C. This essentially made the flash think that the SWF was located in the main folder, versus the sub-folder since it combined the folder name with the file name.

For example:

Internet Explorer read in the path of “/file\some.swf” as “/file/some.swf”.
Firefox read in the path of “/file\some.swf” as “/file%5Csome.swf”.

OK. We all know that no one should have a reason for using a backslash in their file paths, but that’s besides the point. The fact that IE accepted it and Firefox did not is another issue. Why, for the life of me, Firefox would think to convert it is beyond me, but I have a feeling it has to do with code standards. I just don’t like the fact that IE and Firefox are loading paths differently.

So, if you have a problem loading in files dynamically in Firefox, make sure you’re not using a backslash. ;)

// Jacob

Flash Tip: Referencing MovieClip Instances using Variables

Wednesday, October 18th, 2006

Flash Tips Overview

Over the years, there have been little ‘oh, duh’ incidents that have helped me and my team get through troubleshooting Flash projects. I’ve been meaning to create an archive of these incidents to hopefully help some others. While I can’t guarantee that these examples follow “programming principles”, they have gotten us through our projects? and we’ve learned quite a bit along the way. Feel free to send feedback so I can revise or even provide other “alternatives” to these problems/scenarios. (more…)

// Jacob