# Need help asap pls... code inside..sound Obj. related

**URL:** <https://forum.kirupa.com/t/need-help-asap-pls-code-inside-sound-obj-related/128629>\
**Category:** Uncategorized\
**Created:** [November 14, 2004, 10:10pm UTC](https://forum.kirupa.com/t/need-help-asap-pls-code-inside-sound-obj-related/128629 "2004-11-14T22:10:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dj\_dsmooth](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@dj\_dsmooth](https://forum.kirupa.com/u/dj_dsmooth)\
**Post date:** [November 14, 2004, 10:10pm UTC](https://forum.kirupa.com/t/need-help-asap-pls-code-inside-sound-obj-related/128629/1 "2004-11-14T22:10:55Z")

</div>

[font=Arial][size=2]i’ve a clip called set1MC. Inside the clip i run a code that looks like[/size][/font]

[font=Arial][size=2]code[/size][/font]  
[font=Arial][size=2]\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_[/size][/font]

[font=Arial][size=2]trackNames = linkageIDs = new Array(“s1 - 21 coolpop”,“s1 - 21 hats”,“s1 - 21 piano”,“s1 - 21check this”,“s1 - Drum loop”,“s1 - Grif gui”,“s1 - hh drum loop”,“s1 - latin nova”,“s1 - latin1 trumpet”,“s1 - latin2 trumpet”,“s1 - mj jazz drum”,“s1 - mj\_bass lick”,“s1 - under drum”);[/size][/font]  
[font=Arial][size=2]

[/size][/font][font=Arial][size=2]set1 = new Object(); //associative array[/size][/font]

[font=Arial][size=2]function createSoundObjects(nms,IDs){  
for (i=0; i \<= nms.length-1; i++) {  
mcName = “soundObjectMc” + i; // create unique mc instance name  
attachMovie(“empty mc”,mcName,i); // attach a empty mc  
set1[nms\*] = new Sound(eval(mcName)); // create a sound object  
set1[nms\*].attachSound(IDs\*); // attach sound  
_//set1[nms].start(0,999); // just test code to start sound object in an associative array \>\>\>\>\>\>line1_\*  
}  
}  
createSoundObjects(trackNames,linkageIDs);  
**[//this.set1](https://this.set1)[“s1 - 21 coolpop”].start(0,999); \>\>\>\> line 2**  
stop();[/size][/font]  
[font=Arial][size=2]\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_[/size][/font]

[font=Arial][size=2]when i un-comment either line 1 or line 2 which is located inside set1MC… it works and plays my sound objs; however, when I’m in the root and type in a line like[/size][/font]

[font=Arial][size=2]this.set1MC.set1[“s1 - Drum loop”].start(0,999);[/size][/font]

[font=Arial][size=2]or[/size][/font]

[font=Arial][size=2]\_root.set1MC.set1[“s1 - Drum loop”].start(0,999);[/size][/font]

nothing plays. Can anybody pls. help asap? I’ve got a presentation tomorrow. Thanks

d
