2 Replies Latest reply on Aug 20, 2011 2:28 PM by RadekTester

    Transparent space on TitleWindow under clicked Button when TitleWindow is removed from PopUp.

    RadekTester

      Dear Forum,

       

      I'm having an issue. I'm using a title window with 2 s:buttons on it.

       

      Once I'm clicking on my left button that is closing this title window I'm getting this strange effect.

      For a fracton of second button disappears and I can what is under the Title window (below the button) (Screenshot below)

      Than Title Window disapears. This is quite annoying.

       

      Does anyone know how to get rid of this behaviour? Thank you in advance for your reply.

       

      I'm using latest Flex 4.5.1.21328

       

       

      ScreenShot040.png

        • 1. Re: Transparent space on TitleWindow under clicked Button when TitleWindow is removed from PopUp.
          Peter Blazejewicz Level 4

          Cześć Radek,

           

          Hi,

          you mentioned transparency: how that content is displayed? (and what platform)? is that browser hosted or standalone?

          Knowing more details could help people to figure out what could be your problem reason,

           

          regards,

          Peter

          • 2. Re: Transparent space on TitleWindow under clicked Button when TitleWindow is removed from PopUp.
            RadekTester Level 1

            Hi Peter,

             

            Let me try to put more light on the topic. I'm using a browser component (SWF file). This is not AIR application. Chrome / Firefox / IE - all have same strange effect.

             

            swf file is hosted by external (non localhost) www page.

             

            From the technical perspective and Source Code stand point:

             

            Description:

            1) I have main file "MainFile.mxml" (Application)

            2) At some point in time of the application operations "someFunction" function is triggered and is opening up a "CustomAlertWindow.mxml" object called tempAlert.

            3) I have another file with "CustomAlertWindow.mxml" (TitleWindow)

            4) CustomAlertWindow has 2 buttons. Click action for both buttons is triggering an event and closes the window

             

            MainFile.mxml:

             

            <s:Application

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

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

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

            creationComplete="initApp()"

            xmlns:local="*"

            width="960" height="650">

             

             

             

            <fx:Script><![CDATA[

             

             

            public function someFunction()

            {

             

            var tempAlert:CustomAlertWindow;

             

            tempAlert = CustomAlertWindow( PopUpManager.createPopUp(this, CustomAlertWindow, true));

             

            tempAlert.initiateWithNumberOfButtons( 2 );

            tempAlert.setButtonLabels( resourceManager.getString('IntervalsTest', 'YES') , "", resourceManager.getString('IntervalsTest', 'NO'));

              tempAlert.addEventListener('leftButtonClicked', closeCustomAlertWindow);

            tempAlert.closeButton.visible = false;

             

            // display and put in center

            PopUpManager.centerPopUp(tempAlert);

            }

             

             

            private function closeCustomAlertWindow( evn:Event):void{

                 // some code here

            }

             

            ]]></fx:Script>

             

            </s:Application>

             

             

            CustomAlertWindow.mxml:

             

             

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

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

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

            width="330"

            height="200">

             

             

            <fx:Script>

                    <![CDATA[

             

             

             

                        // Handle the Left button.

                        private function buttonLeftClicked():void {

            dispatchEvent( new Event('leftButtonClicked'));

                            PopUpManager.removePopUp(this);

                        }

             

            // Handle the Right button.

                        private function buttonRightClicked():void {

                            dispatchEvent( new Event('rightButtonClicked'));

            PopUpManager.removePopUp(this);

                        }

             

             

             

             

                    ]]>

                </fx:Script>

             

             

             

             

             

            <s:Button id="buttonLeft" label="{buttonLeftLabel}"

            styleName="BlueButton"

            skinClass="skins.ButtonBlueSkin"

            width="120" height="44"

            x="30" y="120"

            click="buttonLeftClicked();" />

             

             

             

            <s:Button id="buttonRight" label="{buttonRightLabel}"

            styleName="BlueButton"

            skinClass="skins.ButtonBlueSkin"

            width="120" height="44"

            x="180" y="120"

            click="buttonRightClicked();" />

             

             

            </s:TitleWindow>