Skip to main content
Inspiring
October 5, 2007
Question

AS3: help with sound object

  • October 5, 2007
  • 2 replies
  • 441 views
I am looking to get started using the sound object to load different sounds into my movie on demand via button. At the moment i have an object that i keep loading new files into but they just play over eachother, instead of kicking the last one out. Any ideas?
If I have 8 diff. sounds do i have to have 8 different sound objects? i can post my code if that will help.
This topic has been closed for replies.

2 replies

Inspiring
October 5, 2007
what exactly is _channel.close(); supposed to do? The SoundChannel class has no such method. change it to _channel.stop(); and tell me what happens.
_Vee_Author
Inspiring
October 5, 2007
thats so funny, b/c i had done that and it worked.... i read that stop() has a problem with it and that close() took care of that. stop() does not stop the stream and that on the next frame, the old sound starts up again... i havent tested it on my server yet...
Inspiring
October 5, 2007
You need to stop your currently playing sound before loading a new one into the sound object. doing this requires a SoundChannel object to handle the sounds properties. The information for this class can be found in the Flash help.
_Vee_Author
Inspiring
October 5, 2007
I tried that and it didnt work. Im using the hushUp function in my .as file for that.