AIR: URLRequest works on Windows but not on Mac

Published on July 18th, 2009 by DannyT. Filed under Flex

If you find that URLRequest works on Windows but not on Mac then simply prepend file:// to your url string. This will then work on both Windows and Mac.

var myFilePath:String = “someFile.xml”;
var request:URLRequest = new URLRequest(“file://” + myFilePath);

3 Responses to “AIR: URLRequest works on Windows but not on Mac”

  1. Rob

    October 30th, 2009 at 5:36 am

    Brilliant! Fixed my problem exactly. (source worked on mac but not windows)

    Reply
  2. Rob

    October 30th, 2009 at 5:37 am

    oops – that’s worked on windows but not mac

    Reply
  3. Nestor

    March 4th, 2010 at 4:16 pm

    One thing to keep in mind is that macs use “/” and windows use “\”

    Reply

Leave a Reply

About DannyT

The blog: danny-t.co.uk - General geek talk focusing on Rich Internet Applications, Microsoft and Adobe technologies and the web in general. The business: Moov2.com - RIA development agency Dan Thomas has been an Internet geek since circa 1994. He has been running Moov2 since 2003 and prior to that worked as a Flash developer for one of europes largest E-learning providers.

Copyright © 2010 Danny-T.co.uk

CSS Template By RamblingSoul | WordPress Theme by Theme Lab and Best Hosting.