2 Replies Latest reply on Jul 19, 2007 7:50 AM by Jihaes

    Passing data between Custom component and main application via custom methods

    Jihaes
      Similar to what this article talks about, I've got a custom list component that has a list of US State names in strings. (Let's call that states.mxml) http://www.boyzoid.com/blog/index.cfm/2006/11/22/Flex-Custom-Components-and-Custom-Methods #comments

      I create an action script which is included in my states.mxml like <mx:Script source="myScripts.as"/> so that I can call the method in mySpcripts.as

      Now what I want to do is, everytime I click on an item from the list, I want that string to show up on the Main Application (on a canvas or panel) as a label.

      I'm not sure how I'm suppose to reference the canvas/panel which is on the main application from myScripts.as
      Is there a way to create an action script file where the methods can reference components from both the main application and the custom component file?

      Thanks