3 Replies Latest reply on Apr 13, 2011 8:33 AM by Lee Burrows

    how to get the properties of application anywhere in the project?

    Rupesh Telang

      Hello,

       

      Application

           |__Component1

                     |___Component2

                                   |___Component3 -----> Component4 ( as Popup)

       

      this is the actal scenario in my flex application..

       

      Do you know any best way to access the properties on the Application Object ??

       

      i want to set the popup component in the middle of the browser screen..

       

      for that i have tried the way...

       

      - Component 4

      <!-- PopupWindow.mxml -->

       

      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"

                      xmlns:s="library://ns.adobe.com/flex/spark"

                      xmlns:mx="library://ns.adobe.com/flex/mx">

           <s:layout>

                <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>

           </s:layout>

       

          

           <s:BorderContainer id="bcPopupWindow" width="700" height="500" backgroundAlpha="0.8" borderAlpha="0.5"

                             borderVisible="true" cornerRadius="20" dropShadowVisible="true">

       

       

      ==     Some designing part   ==

       

           </s:BorderContainer>

      </s:Group>

      and for showing this
      in Component 3 -
      protected function btnShowPopup_clickHandler(event:MouseEvent):void
      {
           myPopup= new PopupWindow();
           myPopup.width = this.parent.parent.parent.width;
           myPopup.height =this.parent.parent.parent.height;
           PopUpManager.addPopUp(myPopup,this,true);
      }