How to Minimize a popup window?

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default How to Minimize a popup window?

    We are using title window as a pop-up.

    The title window has a property called closeButton which when set to true
    displays a close button on the top right hand corner of the title window.
    Likewise, We also need minimizeButton property which can minimise the window.
    Is there any such component like title window which has this property of
    minimise this window or any other workaround.[b]Text

    Mihir@adobeCoE Guest

  2. Similar Questions and Discussions

    1. Popup Window
      Hi all, is there a way to show a popup window with additional information without calling the page from the server again? Cheers Rob
    2. Popup menu on popup window
      Hi, I want to create a popup menu when a button on a popup window is clicked. I have this in my popup window: myMenu =...
    3. minimize flash window
      Does any one know how to minimize a flash window ( which hides the window like the windows operating system minimize window button) -Thanks Mike
    4. Double clicking window bar doesn't minimize
      In illustrator CS when I double click the bar at the top of the document window the window doesn't minimize to the dock. I actually have to click the...
    5. can a popup window return data to parent window?
      Is it possible to do the following in php: I want to have a main form open. In the form I want a button that will open a popup window so the user...
  3. #2

    Default How to Minimize a popup window?

    package Thava

    {

    import flash.events.Event;
    import flash.events.MouseEvent;

    import mx.containers.Panel;
    import mx.controls.Button;
    import mx.effects.Resize;


    public class MinMaxPanel extends Panel

    {

    private var minBtn:Button = new Button();

    [Embed(source="img/minimize.jpg")]
    [Bindable]
    public var minijpg:Class;

    private var maxBtn:Button =new Button();
    private var effResize:Resize = new Resize();



    private var previousHeight:int = 30;

    private var h1:int = 394;

    // public var minMaxButton:MinMaxButton ;

    public function MinMaxPanel()

    {

    super();

    minBtn.addEventListener(MouseEvent.CLICK, minimisePanel);
    maxBtn.addEventListener(MouseEvent.CLICK, maxmisePanel);

    }

    // add the minimize and maximize buttons to the Titlebar of TitleWindow

    override protected function createChildren():void{

    super.createChildren();
    super.titleBar.addChild(minBtn);
    super.titleBar.addChild(maxBtn);
    super.titleBar.addEventListener(MouseEvent.MOUSE_D OWN,handleDown);
    super.titleBar.addEventListener(MouseEvent.MOUSE_U P,handleUp);


    }

    // handleDown and handleUp functions used for dragging the panel container

    private function minimisePanel(e:MouseEvent):void{

    effResize.heightTo = previousHeight;


    effResize.play([this]);
    }




    private function maxmisePanel(e:MouseEvent):void{

    effResize.heightTo =h1 ;

    effResize.play([this]);

    }

    private function handleDown(e:Event):void{
    this.startDrag();

    }
    private function handleUp(e:Event):void{
    this.stopDrag();

    }

    // The below code is for placing the button in the top corner of titleWindow..
    // Decide the position of button by giving height,width....

    override protected function updateDisplayList(w:Number, h:Number):void{

    super.updateDisplayList(w,h);

    minBtn.x = super.titleBar.width - 80;

    minBtn.y = 10;

    minBtn.width = 20;

    minBtn.height = 20;

    maxBtn.x = super.titleBar.width - 50;

    maxBtn.y = 10;

    maxBtn.width = 20;

    maxBtn.height = 20;

    }

    }
    }
    RevThava Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139