title: Using Actionscript 3.0 to play audio from dropbox
body: <p>Just looking for some advice and hoping someone can point me in the right direction.</p>
  <p>I'm trying to create a Flash MP3 player that can play music stored on DropBox. Never used ActionScript before so kind of learning as I go...</p>
  <p>From what I've read so far, I need to use URLRequest to get the link to the mp3 file, then use the Sound object to load the file and play it. However, when I test my SWF file I don't get audio. I've also been reading about URLSream and NETstream, but not sure how to use that with the Sound object. I'm not 100% sure if I'm using Sound correctly, and given that this is pretty old technology now, I'm struggling to find decent tutorials.</p>
  <p>Here's the code I've been trying:</p>
  <pre><code>package  {
      //Dependencies
      import flash.display.MovieClip;
      import flash.media.Sound;
      import flash.media.SoundChannel;
      import flash.net.URLRequest;
      import flash.net.URLStream;
      
      import flash.display.*; 
      import flash.events.*; 
      import flash.net.*; 
      import flash.media.*; 
      
      //Class code
      public class soundObject extends MovieClip {
          
          //Variables
          var mySong:Sound = new Sound();
          
          //Init Code here
          public function soundObject() {
          
              var myRequest:URLRequest = new URLRequest(&quot;https://www.dropbox.com/s/[dropboxurl]/T-U-R-T-L-E%20POWER.mp3?dl=0&quot;)
              mySong.load(myRequest);
              mySong.addEventListener(Event.COMPLETE, onSoundLoad);
              
          }
          
          private function onSoundLoad(e:Event): void
          {
               mySong.play();
          }
      
  }
  
  }
  </code></pre>