1 Reply Latest reply on Oct 22, 2009 4:07 PM by Seglespaan

    Ligthbox equivalent?


      I have a button and when i pressed i want a ligtbox(maybe a flex Panel?) to apper.

      As far i have done this:

      <s:Button x="530" y="324" label="Button" click="myPanel.visible=true;"/>
      <s:Panel x="534" y="87" width="250" height="200" visible="false" id="myPanel"></s:Panel>

      How can i disable the background of the Panel-popup?


      thanks u

        • 1. Re: Ligthbox equivalent?

          I think what you want is a popup using the popup manager, as thats pretty close to a lightbox.


          if you havn't already create a folder called components inside your src folder.


          right click and create new mxml component called lightbox_popup.mxml, this can be a canvas a panel or whatever you like.


          then in your main application declare a function called mypopup


          public function mypopup()



                 lightbox = new lightbox_popup();
                 PopUpManager.addPopUp(lightbox,this, true);




          then change your button code to this


          <s:Button x="530" y="324" label="Button" click="mypopup()"/>



          oh and if you havn't already you'll need to create a namespace for your components folder at the top of you main application


          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
              width="1024" height="700">



          almost forgot you'll need to include the managers class too at the top of your file


                       import mx.managers.*;