Adding mouse event to Panel and TitleWindow : TitleWindow « Container « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Container » TitleWindowScreenshots 
Adding mouse event to Panel and TitleWindow
Adding mouse event to Panel and TitleWindow
     

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    initialize="init(event)">
    <mx:Script>
    import mx.controls.Alert;
    import flash.events.MouseEvent;
    import flash.events.Event;
    public function init(e:Event):void {
        p1.addEventListener(MouseEvent.MOUSE_DOWN,showAlert);
        tw1.addEventListener(MouseEvent.MOUSE_DOWN,showAlert);
    }
    public function showAlert(e:Event):void {
        Alert.show(e.currentTarget + "\n" + e.eventPhase);
        e.stopImmediatePropagation();
    }
  </mx:Script>
    <mx:Panel id="p1" title="Panel 1">
        <mx:TitleWindow id="tw1" width="300" height="300" showCloseButton="true" title="Title Window 1">
            <mx:Button label="Enter name" />
            <mx:TextArea id="ta1" />
        </mx:TitleWindow>
    </mx:Panel>
</mx:Application>

   
    
    
    
    
  
Related examples in the same category
1.Add close event listener for TitleWindowAdd close event listener for TitleWindow
2.Add Mouse Down listener to TitleWindowAdd Mouse Down listener to TitleWindow
3.Creates a TitleWindow container inside a Panel container.Creates a TitleWindow container inside a Panel container.
4.Resize TitleWindow with TransitionResize TitleWindow with Transition
5.Change TitleWindow position and size in stateChange TitleWindow position and size in state
6.Add control to TitleWindowAdd control to TitleWindow
7.Make TitleWindow to show Close buttonMake TitleWindow to show Close button
8.Add close handler to TitleWindowAdd close handler to TitleWindow
9.Top level TitleWindow tag
10.TitleWindow Title, close button, position, border color and border alphaTitleWindow Title, close button, position, border color and border alpha
11.Add button to window through ActionScriptAdd button to window through ActionScript
w___ww._j_av___a___2s__.__c__om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.