This content has been marked as final. Show 3 replies
I'm not sure I quite follow the structure of your application. Are you distributing an AIR application that essentially loads a web application from one of many possible web servers? If that's the case, then it seems like the base URLs would be determined by the HTML code served by the web server, not the client AIR application.
The application is a combination of of Air and html. There are many points at which html is called, not in one large application. This is fine if the app is distributed from one web server. However, if someone buys the app to distribute from their own servers do I have to re-write the server URLs throughout the whole app for each customer or is there a way to set it in one place for each customer. Or, is Air agnostic about where it is installed from?
I hope this is more clear.
An AIR app won't know anything about the server you install it from (and it might not be installed from a server). There's no built-in API for setting a base URL -- and it wouldn't really make sense in the context of an AIR app since, in the general case, an AIR app is not tied to a particular server URL.
You could create a variable in your app to use as the base for resolving URLs -- and the code to use it. Even if you use a base URL variable, you will have to set it somehow -- either post-install when the user configures the app, or by creating a separate AIR package for each client. One way to do this is to create an install badge for your clients that passes the server URL to the AIR app, which then saves the URL. (But also consider the case where the user downloads the AIR file and installs it later.)