Q:

In AS3 / Flash Can a URL Request / Loader Use "//" without Specifying a http or https Protocol?

I have a flash app running that loads remote data and we're transitioning to use (SSL) https:// 
I am wondering is it possible to just use "//" as you would in JavaScript to automatically assume the parent page's protocol (http or https).
Thanks
update: it seems to me that you can use a url format like "//www.something.com" but instead of  assuming the page protocol it seems like it's just defaulting to "http://www.something.com".  
Now I'm working around this by checking if the SWF is an SSL url. Something like this:
if( loaderInfo.url.indexOf("https:") == 0 ) {
    //replace http: with https:
}

Which is unfortunately inconvenient to be doing that everywhere you handle a remote asset URL.  Just loading everything with matching proto would be a lot nicer... like "//www.someurl.com/wouldbenicer.xml", especially since js and html both work that way. 
Blah.
Any ideas?

A:

"//" relative proto doesn't work in flash the way the browser works with urls in HTML, instead it defaults to http://
Workaround:
Check the URL of the SWF to see if the URL about to be loaded should be modified to have https:// protocol:
 if( loaderInfo.url.indexOf("https:") == 0 ) {
     //replace http: with https:
 } else {
   //replace https: with http:
 }

