Latest Twitter Update:






Dynamic Flash Pathing in Firefox versus IE

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

5 Responses to “Dynamic Flash Pathing in Firefox versus IE”

  1. Anonymous Says:

    It’s not a bug. The person should have used a forward slash. The resulting URLs are not compliant, and there is no general protocol browsers should use when trying to deal with non-compliant URLs.

    I pray the Mozilla team will forgive you for insulting their browser.

  2. Jacob Says:

    Dear Anonymous er *cough*Mr. Neil*cough*,

    I’m sure the Mozilla team has enough users to not care of my comments about the Firefox browser. The browser in itself is very solid, and it’s capable of surviving people like you who like to comment on other blogs in hopes to defend it like a true soldier. I never said that Firefox had a bug, I said the game had a bug which was due to inconsistent path handling in the browsers. But, I appreciate your feedback.

    P.S. let me know when you are done blogging and are ready to get back to work. ;) ;)

  3. Sol Young Says:

    Good find. I’m partial to IE and Safari. Unfortunately, Google’s web apps are most stable in FF or I’d be FF free.

    Anyway, how did Safari treat the path?

  4. Ben Neil Says:

    Here is a fix for the ‘bug’
    https://addons.mozilla.org/en-US/firefox/addon/426

  5. Antonis Says:

    I tried the extension but my flash files that load sounds like loadSound(”Sounds\\somesound.mp3″) still not work in firefox.

Leave a Reply