Just wanted to share this "as" for getting the host. It can be a little pain when working between running local, inside flex, or on a server. So if your using services this may or may not benefit you.
I use it in my main application container. Us it however you wish. If anyone has a better way to do this then please share.
If in your main app the you can get at it vie Applicatio.application.g_HostString. Also ready to bind.
[Bindable]
[Inspectable]
public var g_HostString:String;
private function initComponent(){
//parse the host url into a usable value for services etc...
var baseurl:String =Application.application.url;
var pattern1:RegExp = new RegExp("http://[^/]*/");
if (pattern1.test(baseurl) ==true){
g_HostString = pattern1.exec(baseurl).toString();
}
else{
g_HostString = "http://localhost/"
}
}
Jason
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

