1 Reply Latest reply on Sep 21, 2006 8:37 AM by dimival

    Communicating between components and main app

    blomasky Level 1
      I have an application (mainapp) in which I instantiate 2 components (comp1 and comp2).
      question 1: what is the syntax for comp1 to update a public var in the main app
      question 2: what is the syntax for comp1 to call a method in comp2?

      thanks

      Bruce
        • 1. Re: Communicating between components and main app
          dimival Level 1
          You can use Application.application, this way you can access your application, like this:

          Application.application.method_name( );
          Application.application.public_var = new value;

          But i would recommend you to use events to communicate between components and the main application, if you have doubts about events check out the Flex documentation, trust me events are the best option.