3 Replies Latest reply on Sep 5, 2007 5:52 AM by levancho

    Blocking user interaction

    Santanu Karar Level 1
      Hi,

      How could I block any user interaction while an effect is playing. I dont want to use "suspendBackgroundProcessing" as I'm processing datas also intime of playing the effect. This would be preferable if something like "showBusyCursor" kinda thing!

      Any ideas..!


      Tnks,

      ASB
        • 1. Blocking user interaction
          Navin Reddy
          hello,

          By using Popupmanager you can block user interaction....
          create panel component

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Panel xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="400" x="200" y="100">
          <mx:Button id="cancel" label="Cancel" x="300" y="320" click="PopUpManager.removePopUp(this);"/>
          <mx:Script>
          <![CDATA[
          import mx.managers.PopUpManager;
          ]]>
          </mx:Script>
          </mx:Panel>

          create a AS3 variable globally

          var popup:PopUpPanel = new PopUpPanel(); // declare as globally

          add following code whenevr you want to block user interaction

          PopUpManager.addPopUp(popup,this);

          add following code whenever you want to allow user interaction

          PopUpManager.remove(popup);


          you may add swf components such as loading symbols.....




          • 2. Re: Blocking user interaction
            Santanu Karar Level 1
            Hi Navin,

            Thanks for your help. The idea is obiviously good.. though I cant incorporate it in my system as if I make popup's modal option ON, the background became greyed.. and in your example since the modal option is OFF, the click can be done anywher in time of an effect is playing.


            But anyway, thanks for your response.

            ASB
            • 3. Re: Blocking user interaction
              levancho Level 3
              you can do Application.application.disabled=true
              and when animation is done
              Application.application.disabled=false?

              or if that is too radical use "disabed" otpnio on some other container that is covering controls of user overreaction.