title: AS3 - starting function at end of another function
body: <p>I have an AS3 function that I need to end with calling another function.  </p>
  
  <pre><code>function receiveText(value:String):void {
          channel.stop();
          channel2.stop();
          songPosition = 0;
          var soundFile2:URLRequest = new URLRequest(jsVariableValue2);
          var myMusic2:Sound = new Sound();  //Intstantation
          myMusic2.load(soundFile2, myContext);
  </code></pre>
  
  <p>I need to call this playMusic function at the end of it in order to start playing the audio track</p>
  
  <pre><code>function playMusic(evt:Event):void
  {
      if (soundFile2exist == "noValue")
      {
          channel = myMusic.play(songPosition);
      }
      else
      {
      channel = myMusic.play(songPosition);
      channel2 = myMusic2.play(channel.position);
      }
      myTimer.start();
      btnPlay.mouseEnabled = false;
      trace (soundFile2exist);
  }
  </code></pre>