Wednesday, January 13, 2010

Determining which server/domain a SWF is hosted on

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.

Full code after the jump.


flex server domain

No comments:

Post a Comment

Your comments is appreciate.