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) |
Flexache, is the pain you feel in your brain when you coding on Adobe’s Flex Builder, Flash builder with Flex SDK and Actionscript in general. The pain is starting from the eyes, as you can’t believe what you see and is getting deep in your head as you can’t fix. In this blog I‘ll give you painkiller to get out of a lot strange troubles showing solutions and techniques in Flex.
Saturday, 4 June 2011
Flex, Determining which server/domain a SWF is hosted on
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment