1
votes

what's the best and shortest way to get this information?

i've read about BrowserInvokeEvent which contains a boolean of the sort - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/BrowserInvokeEvent.html#isHTTPS,

yet i havn't been able to implement it.

If it's possible, i'd appreciate an example.

1
Hi @wvxvw I'm trying to make a browser plugin. I've realized it's an Air component and was asking of it's possible Flex equivalent. Flextras got what i wanted to achieve. Thanks alot! - silicakes

1 Answers

2
votes

Since you tagged this as Flex/Flash/ActionScript I assume you want to know if your SWF file is served from n a page using SSL/TLS. There is no 100% way to find this information.

If you want to know what the URL of the SWF is, you can use the URL property of the Application tag. Then run it through URLUtils.isHttpsURL to find whether the URL is an HTTPS URL.

If you want to know the URL of the enclosing page, you can get at that using ExternalInterface and JavaScript code. However, if the SWF and the enclosing page are not on the same domain this can cause cross domain runtime errors.