Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3286942
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:26:14+00:00 2026-05-17T20:26:14+00:00

In his blog post , Christian Cantrell shows how to use STORAGE_VOLUME_MOUNT in ActionScript.

  • 0

In his blog post, Christian Cantrell shows how to use STORAGE_VOLUME_MOUNT in ActionScript.

He has written a Flex app called FileTile.

I would like to see a JavaScript alert box that says “You have inserted “ + e.storageVolume.name, and “You have removed a storage volume”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:26:15+00:00Added an answer on May 17, 2026 at 8:26 pm
    <html>
    <head>
    <title>New Adobe AIR Project</title>
    <script type="text/javascript" src="lib/air/AIRAliases.js"></script>
    <script type="text/javascript" src="lib/air/AIRIntrospector.js"></script>
    <script type="text/javascript" src="lib/jQuery/jquery-1.4.3.min.js"></script>
    <script type="text/javascript">
    var msg = '<h1>Please insert your SwatchDog (SD) card.</h1>';
    
    function trace() {
        var message = 'Hello Max';
        air.Introspector.Console.log(message);
    }
    
    function readFile(v) {
        var myFile = air.File.desktopDirectory.resolvePath("MyFile.txt");
        var fileStream = new air.FileStream();
        fileStream.open(myFile, air.FileMode.READ);
        $('#app').append('<p>' + fileStream.readUTFBytes(fileStream.bytesAvailable) + '</p>');
        fileStream.close();
    }
    
    function onVolumeMount(e) {
        $('#app').html('<h1>Thank you</h1><p>I can see you have multiple devices:</p>');
        var volumes = air.StorageVolumeInfo.storageVolumeInfo.getStorageVolumes();
        for (var i = 0; i < volumes.length; i++) {
            $('#app').append(volumes[i].rootDirectory.nativePath);
        }
    
        if (e.storageVolume.isRemovable) {
            if (e.storageVolume.name == 'SWATCHDOG') {
            $('#app').append('<p>And SwatchDog is drive: ' + e.storageVolume.rootDirectory.nativePath + '</p>');
            readFile(e.storageVolume)
          } else {
            $('#app').append('<p>But the one you just plugged in is not SwatchDog.</p>');
          }
        }
    }
    
    function onVolumeUnmount(e) {
        $('#app').html('<h1>Goodbye!</h1>' + msg);
    }
    
    
    jQuery(function($){
        var PluggedIn = false;
        var volumes = air.StorageVolumeInfo.storageVolumeInfo.getStorageVolumes();
        for (var i = 0; i < volumes.length; i++) {
            if (volumes[i].isRemovable) {
                PluggedIn = true;
                if (volumes[i].name == 'SWATCHDOG') {
                    $('#app').append('I see you already have SwatchDog plugged in!');
                    readFile(volumes[i])
                } else {
                    $('#app').append('What you have plugged in is not SwatchDog.');
                }
            }
        }
        if (!PluggedIn){
            $('#app').append(msg);
        }
        air.StorageVolumeInfo.storageVolumeInfo.addEventListener(air.StorageVolumeChangeEvent.STORAGE_VOLUME_MOUNT, onVolumeMount);
        air.StorageVolumeInfo.storageVolumeInfo.addEventListener(air.StorageVolumeChangeEvent.STORAGE_VOLUME_UNMOUNT, onVolumeUnmount);
    })
    </script>
    </head>
    <body>
        <div id="app">
        </div>
        <button onclick="trace();">Say Hello Max!</button>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scott Gu didn't talk about this in his blog post. Will there be intellisense
Mr. Ayende wrote in his latest blog post about an implementation of a queue
I saw Jeff Atwood's post on his blog about Exception Driven Programming and I
As ScottGu says in his blog post «by default content emitted using a @
I saw Scott Guthrie's post about helper methods via his blog . Specifically this:
A user wants to post in his blog, he fills the field and click
My co-worker posted a question on his blog . He is referring to rendering
Recently Jeff has posted regarding his trouble with database deadlocks related to reading. Multiversion
Use case: A does something on his box and gots stuck. He asks B
My dad called me today and said people going to his website were getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.