Re: GetDomain$ does not work with HTTPS://
Ther code for this function uses the LocalConnection object in Flash. The domain is returned by a variable in the object, that contains it. I dont do anything with the name, it comes direct out of Flash.
I have search for http/https problems with localconnection on the internet and found nothing.
So I dont think I can correct this.
Re: GetDomain$ does not work with HTTPS://
Andy, if Javascript works alright, why not use a Javascript function?
Code:
getDomain = function()
{
return window.top.location.hostname
}
Come to think of it (Francois :) ), the Flash Player object could probably do that internally via the ExternalInterface, as a fallback for whatever it's doing currently:
Code:
var domain:String = flash.external.ExternalInterface.call
("function() { return window.top.location.hostname }").toString()
Re: GetDomain$ does not work with HTTPS://
Hi Jamie, that's a good suggestion too, although it still amounts to the same situation of needing to use javascript to get to a new page. Would be excellent if you can hide this away from the developer but if not I shall use the work around.
Another question then... is it possible to support relative URL's in the Flash object as this would solve the problem. Currently relative URL's dont work, ie:
OPEN URL [ "/mypage.html" ] in current window
Comes out something like http:///mypage.html int he browser address bar.
Re: GetDomain$ does not work with HTTPS://
Thanks Jamie, I'll implement this.
Re: GetDomain$ does not work with HTTPS://
Just realised that I have already implemented this Javascript function. In the GetWindowDomain function. You should try it, maybe it works.
Re: GetDomain$ does not work with HTTPS://
Quote:
Originally Posted by Francois
Just realised that I have already implemented this Javascript function. In the GetWindowDomain function.
I just wanted to point out that this function seems to return an empty string after the .swf was embedded with MochiMedia's Live Updates. Kind of annoying. Reported here.
Re: GetDomain$ does not work with HTTPS://
If this is the case, I do not know what to do. Jamie might have an idea?