3 Replies Latest reply on Dec 2, 2009 1:12 PM by chadillac83

    Custom settings interface?...

    chadillac83

      After developing a video chat application our companies design team is now pressuring us to find a way to skin/customize the built in settings interface (right click -> settings) for selecting a cam, mic, and privacy settings.

       

      According to the lead designer he recalls Yahoo! Live using such an interface to allow their users to pick cams, mics, etc.  Yahoo! Live was shut down Dec. 3 2008 and is no longer available.  After spending a good chunk of my life looking over pages and pages of Google results I have YET to find a solution that accomplishes this.  We've already setup shortcuts to launching the various panels using flash.system.Security -> Security.showSettings() calls to make it easier for the user to find the panels but this still isn't what they're asking for technically.

       

      My questions are as follows:

      1. is skinning that panel even an option?
      2. is it possible to avoid using the default panel and pass settings values into the Security API for processing from a custom interface?
      3. can you specify an alternative panel that can be dropped in to replace the existing Adobe designed one (similiar to skinning I suppose)?

       

      I'm banging my head against the wall hear and finding documentation to support the design teams claims is like hunting for Big Foot at this point.

       

      Flex forums don't fail me now!  Attached is an example comp of what they would like to see.

        • 1. Re: Custom settings interface?...
          chadillac83 Level 1

          does anyone even use these damn forums?!

           

          bump.

          • 2. Re: Custom settings interface?...
            chadillac83 Level 1

            ANYONE!?!?!?!??!?!?!??!?

            • 3. Re: Custom settings interface?...
              chadillac83 Level 1

              This will be my last time using the Flex forums because he suck ******* as far as community involvement is concerned.... with that said.

               

              THIS ISN'T POSSIBLE SO DON'T WASTE YOUR TIME RESEARCHING... IF YOU PLAN ON DOING SOMETHING ALONG THESE LINES READ BELOW.

               

              You'll have to roll your own if you plan on handling cam and microphone management.  I personally used client side shared_objects and gave the user and interface for selecting their cam and mic.  Store the index of their selection and then use it when hooking up their resources.  A couple quick code examples to help explain.

               

               

              Get their cams:

              public function _initComponent(event:Event = null):void
              {
                   usable_cams = new Array();
                   fps_detected = new Array();
                   functional_cams = new Array();
                             
                   for(var i:int = 0; i<Camera.names.length; i++)
                   {
                        var camera_object:Object = {'index':i, 'name':Camera.names[i], 'functional':false};
                        usable_cams.push(camera_object);
                   }
                             
                   this.addEventListener(Event.ADDED_TO_STAGE, _initComponent);
                             
                   setTimeout(handle_fps, 10000);
                             
                   confirm_camera.visible = false;
                   detecting_overlay.visible = true;
              }
              

               

              Store cam selection:

                   public function confirm_cam():void
                   {
                        Application.application.stored_settings.data.webcam_index = previewing.index;
                             
                        try
                        {
                             Application.application.stored_settings.flush();
                        }
                        catch(e:Error)
                        {
                             Alert.show('failed saving camera selection');     
                        }
                             
                        // clean up resources
                        cam_preview.clear_hack();
                        usable_cams = new Array();
                        functional_cams = new Array();
                        fps_detected = new Array();
                        PopUpManager.removePopUp(this);
                        Application.application.chatRoom.cam_controls.trigger_setup(start_stream);
                   }
              

               

              Hooking up Cam:

                   // check for and setup cam
                   if(Camera.names.length > 0)
                   {     
                        if(Application.application.stored_settings.data.webcam_index == -1)
                        {
                        // they haven't selected which cam to use, so grab the default for now
                        this._cam = Camera.getCamera();
                     }
                     else
                     {
                          this._cam = Camera.getCamera(String(Application.application.stored_settings.data.webcam_index));
                     }
                                
                        set_cam_quality();
                   }