Components Flex



    
        
            import mx.events.FlexEvent;
            protected var names:Array = ['A','B','C'];
            protected var titles:Array = ['a','b','c'];
            
            protected function app_creationCompleteHandler(event:FlexEvent):void
            {
                btn.addEventListener(MouseEvent.CLICK, showNames);
                btn.addEventListener(MouseEvent.CLICK, showtitles);
            }
            protected function showNames(event:MouseEvent):void
            {
                trace(names.toString());
            }
            protected function showtitles(event:MouseEvent):void
            {
                trace(titles.toString());
            }