0 Replies Latest reply on Sep 15, 2011 1:28 PM by brownheezo

    Flash Builder (AIR 2.0) USB/mount drive detection

    brownheezo

      I'm creating a drive mount listener in Flash Builder.  For the most part, it works well.  Lately, I have had a problem actually getting the event of a drive being mounted.

       

       

          var s:StorageVolumeInfo=StorageVolumeInfo.storageVolumeInfo;
           s.addEventListener(StorageVolumeChangeEvent.STORAGE_VOLUME_MOUNT,USBMounted);

       

      Then the handling method:

       

          private function USBMounted(e:StorageVolumeChangeEvent):void
          {
              Alert.show("Drive Unmounted");
              printDirectory(e.rootDirectory);
          }

       

      My two questions:
      - Has anyone ever used this method to read all drives being mounted (CD, SD card, etc)?
      - Is there any way to get this to work using a USB hub?

       

      Thanks