# How to play sound?

**URL:** https://forum.kirupa.com/t/how-to-play-sound/301691
**Category:** flash
**Created:** [December 14, 2009, 10:35am UTC](https://forum.kirupa.com/t/how-to-play-sound/301691 "2009-12-14T10:35:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![uday\_sgh](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@uday\_sgh](https://forum.kirupa.com/u/uday_sgh)
#### Post date: [December 14, 2009, 10:35am UTC](https://forum.kirupa.com/t/how-to-play-sound/301691/1 "2009-12-14T10:35:23Z")

</div>

Hello all,

I have a small problem, I hope actionscript expert can give me a solution.

I have two files as: A.swf and B.swf

A.swf Code:  
mc.loadMovie(‘B.swf’); // mc is blank movie clip on the stage

B.swf Code:  
var mySound\_sound = new Sound();  
mySound\_sound.attachSound(“music”); // music is the linkage name of sound  
mySound\_sound.start();

While I am playing B.swf then music is plays perfectly. While I load it to in A.swf then music in not playing.

//NOTE: I don’t want to change anything in B.swf like new Sound(this). I want actionscript code only for A.swf

I hope you can give me a solution for this problem?
