Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-05-2012, 08:37 PM   #1
Digg00
Registered User
 
Join Date: Jul 2012
Posts: 3
Default [AS2] Sound remove from background

Sorry for stupid question.

I have a movieclip that you press "B" on keyboard the 1st time it stops the Audio 1 and plays the Audio 2, you press "B" on keyboard the 2nd time it stops the Audio 2 and plays the Audio 1, you press "B" the 3rd time it stops the Audio 1 and plays the Audio 2, etcetc. Like swapping. It works well.

However, I'm using the command
Quote:
stopAllSounds();
to stop the Audio 1 or 2, but facing one annoying problem: the "stopped" Audios still "exist" on background muted and thus the more "stopped" Audios there goes the more laggy it gets as they exist there on background.

It is a huge problem as when there's lots of other things you do on the game and you press the B for like 100 times, you can't do like anything anymore because there's the 100 muted sound clips on the background.

Demonstrated .swf with random sounds: puu.sh/OUdc

So my question is, how to "remove" the stopped audios from background from lagging the whole swf? "delete mysound" works only if you want to play it once.
Digg00 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:00 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.