4 Replies Latest reply on Oct 6, 2008 2:25 PM by Kieran Briggs

    Pass value to flex Httpservice at runtime

    Kieran Briggs
      I've got an application which opens a csv file in a datagrid and allows manipulation of the data and then output to an array. What I am struggling with is I want to flex panel to open up a csv file based on the selection from a html list box on the webpage. I first thought of passing the value through flashvars but this only works at page initialisation. How can I pass this variable to the httpService url each time the user changes the option on the webpage? The relevant piece of code to get the path is:

      private var path:String;

      private function initVars():void
      path = Application.application.parameters.csvPath; // flashvars parameter

      <mx:HTTPService id="information" url="{path}" resultFormat="text" result="parser(event.result)"/>

      Thanks in anticipation