1 Reply Latest reply on Mar 5, 2008 1:47 PM by ntsiii

    Calling a function in a flex app from a loaded SWF

    trainsimple
      How can I call a function in a flex application from a loaded swf file?
        • 1. Re: Calling a function in a flex app from a loaded SWF
          ntsiii Level 3
          Two ways:

          Application.application returns a reference to the top-level application scope. You can access any public member, var, function, component, etc through that reference.

          Dispatch an event event form the loaded swf and use a event handler in the main app. All the gurus advise this as best practice, to ensure "loose coupling" It is also pretty easy, especially if you use a bubbling event.

          Tracy