House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  Adobe Flex

help with picking up dynamic url

  << Previous Post |  RSS |  Subscribe to this Group Next >> 

help with picking up dynamic url

Basically, I am trying to get the url from the application, and set some rules Burak Toker 11/10/2009 04:06 PM

11/10/2009 04:06 PM
Author: Burak Toker Short Link: http://www.houseoffusion.com/groups/flex/thread.cfm/threadid:2018#6184 Basically, I am trying to get the url from the application, and set some rules so that flex will call the right ColdFusion template depending on what server this application is running on like dev, staging or production. The application is for uploading a csv file. A coldfusion page reads some values from the csv file, and inserts/updates some db records. I have the following: [Bindable] private var _strDomain:String = new String("http://dev.domain.com/");             [Bindable] private var _strUploadScript:String = new String(_strDomain + "ubs/upload.cfm");             private var unid:int = 0;//Application.application.parameters.unid;                        // Initalize             public function initApp():void {                                    _strDomain = mx.core.Application.application.url;                 var index:int = _strDomain.indexOf("/Intranet");                 _strDomain = _strDomain.substr(0, index);                 _strUploadScript = _strDomain + "/Intranet/ubs/upload.cfm";                                    mx.controls.Alert.show('a:'+_strUploadScript);                 Security.allowDomain('*'); there are several issues. if i get rid of all the stuff in initApp and run this in dev by calling: http://dev.domain.com/ubs/upload.cfm it works great. It doesn't seem like initApp() changes the _strDomain, _strUploadScript right. If i get rid of the above vars, then I get all sorts of 'access of undefined property errors'. The initApp is called by  creationComplete="initApp()". I am new to flex 3/as 3 and cannot resolve this issue. What am I doing wrong? thanks in advance.
<< Previous Thread Today's Threads Next Thread >>

Search flex

May 25, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference