title: AS3: How to Control Sound Channel of Another Scene from Inside a MovieClip?
body: <p>can you help me? Im a beginer im programming and I'm just barely know as3. I have a problem controlling my bg sound using as3 script from inside a movieclip.</p>
  
  <p>I have an as3 flash project with multiple scene (let's say it sceneA and sceneB), and i placed my sound channel script at SceneA frame 1. I've been able to stop and play my music from sceneA without any trouble. Now at sceneB i have a movieclip and inside it, there's button stop and play. The problem is, I can't use the same method from sceneA to control my music from inside the movieclip of sceneB. How can i do it? Please i need your help.</p>
  
  <p>Here's my sound channel script from sceneA frame 1:</p>
  
  <pre><code>var bgm:bgSound = new bgSound();
  var sChnl:SoundChannel = new SoundChannel();
  var myVolume:SoundTransform = newSoundTransform();
  sChnl = bgm.play(0,999,myVolume);
  </code></pre>
  
  <p>Here's my sceneA button stop script, this button is called btnStop:</p>
  
  <pre><code>function musicStop(event:MouseEvent):void
  {
  SoundMixer.stopAll();
  bntStop.visible=false;
  btnPlay.visible=true;
  }
  </code></pre>
  
  <p>Here's the play button called btnPlay:</p>
  
  <pre><code>function musicPlay(event:MouseEvent):void
  {
  sChnl = bgm.Play(0,999,myVolume);
  bntStop.visible=true;
  btnPlay.visible=false;
  }
  </code></pre>
  
  <p>I tried the button play script from sceneA in my SceneB button play and it give me an error:</p>
  
  <pre><code>Symbol 'Symbol 1', Layer 'btn control', frame 1, Line 22     1120: Access of undefined property bgm.
  </code></pre>
  
  <p>That's one of the error massage, the other two is the same just that the bgm is myVolume and sChnl.</p>
  
  <p>I have tried this function before</p>
  
  <pre><code>MovieClip(root).sChnl = bgm.Play(0,999,myMusic);
  </code></pre>
  
  <p>But it's not working.</p>