2 Replies Latest reply on Mar 20, 2008 11:50 AM by CoreNeter

    passing data around components, dashboard sample

      In main.mxml the charts are created the following way:
      ...loops x times
      var podContent:PodContentBase = null;
      if (podXMLList[j].@type == "chart")
      podContent = new ChartContent();

      PodContentBase is an .as actionscript file which downloads data and the ChartContent handles this data and does the plotting.

      In this PodContentBase class is a function called "onCreationComplete" which is where the data download starts based on links it reads from files. However in my case I need to make this url dynamic and be able to pass it to this function on initialization, how can i pass my url to this onCreationComplete function?



      public class PodContentBase extends VBox

      private function onCreationComplete(e:FlexEvent):void
      // Load the data source.
      var httpService:HTTPService = new HTTPService();
      httpService.url = "need to pass my url in here";
      httpService.resultFormat = "e4x";
      httpService.addEventListener(FaultEvent.FAULT, onFaultHttpService);
      httpService.addEventListener(ResultEvent.RESULT, onResultHttpService);