# Importing sounds from external SWF

**URL:** <https://forum.kirupa.com/t/importing-sounds-from-external-swf/171222>\
**Category:** flash\
**Created:** [December 2, 2005, 9:05pm UTC](https://forum.kirupa.com/t/importing-sounds-from-external-swf/171222 "2005-12-02T21:05:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nosaj](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@Nosaj](https://forum.kirupa.com/u/Nosaj)\
**Post date:** [December 2, 2005, 9:05pm UTC](https://forum.kirupa.com/t/importing-sounds-from-external-swf/171222/1 "2005-12-02T21:05:11Z")

</div>

Hey people,

I know this subject has been spoken upon alot and tutorials provided such as  
[http://kennybellew.cowfly.com/tutorial/preload\_attachsound.htm](http://kennybellew.cowfly.com/tutorial/preload_attachsound.htm)

but I still somehow cant get it to work! I’ve spent hours surfing around and trying to fix it but I guess I’ve reached a dead end. This is how my .fla files are.

One contains the sound. The .fla is called Track2.fla.  
In it, I’ve imported a .wav file and set the Linkage to export for AS and export in first frame. The identifier is “Track2”.

on the first frame of the timeline, I added this code:  
trackMusic = new Sound(this);  
trackMusic.attachSound(“Track2”);

========

For the second .fla, it is called Test.fla. I created the empty movie clips such as the tutorial has suggested and placed this codes in the first frame:

\_root.soundHolder.loadMovie(“Track2.swf”);  
\_root.soundHolder.trackMusic.start();

No sound at all.  
The funny thing is when i placed trackMusic.start() in Track2.fla it works perfectly.

Also I have tried the following and have yet to succeed :

var BackgroundMusic:sound = new Sound(2);  
loadMovie(“Track2.swf”, 2);  
BackgroundMusic.attachSound(“Track2”);  
BackgroundMusic.start();
