Be a Supporter!

Need help with sound AS.

  • 398 Views
  • 2 Replies
New Topic Respond to this Topic
Dark34
Dark34
  • Member since: Jan. 24, 2005
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Need help with sound AS. 2006-10-14 02:07:48 Reply

I hope I made the title descriptive enough. Okay, so here's my problem:

I got three songs that I imported into my library. I linkaged them for AS.

on (release) {
bgSound = new Sound(this);
bgSound.attachSound("littlebeat");
bgSound.start(0, 99);
bgSound2.stop()
bgSound3.stop()
}

on (release) {
bgSound2 = new Sound
bgSound2.attachSound("sgb");
bgSound2.start(0, 99);
bgSound.stop()
bgSound3.stop()
}

on (release) {
bgSound3 = new Sound;
bgSound3.attachSound("threebeat");
bgSound3.start(0, 99);
bgSound.stop()
bgSound2.stop()
}

So basically, what I want to happen is that when I click on the button to listen to the other song, the song currently playing stops and the song I want to listen to plays. The problem is that when I try to listen to another song, there's just silence. What am I doing wrong?

64
64
  • Member since: Feb. 16, 2004
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to Need help with sound AS. 2006-10-14 02:36:17 Reply

What I notice is that you are missing a "(this)" on the second and third scripts. I'm not sure if that's the problem, but you can try.

Dark34
Dark34
  • Member since: Jan. 24, 2005
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to Need help with sound AS. 2006-10-14 02:44:10 Reply

I changed them to the target path they were specified to and it works! But thanks for your help ChtFreak.