situation | |
Here’s a handy tip which can help you when deploying Flex applications on mulitple servers (such as a staging/production server). Basically you can listen for the Application tag to dispatch the applicationComplete event, grab the URL of the SWF using the loaderInfo.url property, and then use the URLUtil.getServerName() method to parse out the server name. | |
problem | |
adobe flex4 flex 4.0 AS3.0 Determining which server/domain a SWF is hosted on | How to get the domain where the swf is hosted ---- > page: dn | |
difficulty level | |
0/10 :))) | |
compatibility | |
flex4, as3 | |
solution | |
In prior version of Flex 4.0 use this: URLUtil.getServerName(Application.application.loaderInfo.url); In 4.0 use this: because Application is no longer available in 4.0 URLUtil.getServerName(FlexGlobals.topLevelApplication.url) |
Information technology (it) often FAILS! Let's solve it. Problems and solutions on areas: Adobe's Flex, PHP, Delphi, Visual Studio, Windows, intranet, internet, popular applications, hacks, cheats techniques and much more; so enjoy your fail!!!
Saturday, 4 June 2011
Flex, Determining which server/domain a SWF is hosted on
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment