Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sound cuts off too soon

Status
Not open for further replies.

RedRobotHero

Technical User
May 2, 2003
94
CN
When this code is executed, the sound cuts out far too quickly. I don't have crash.stop() anywhere in the code, yet. How do I get it to play the whole sound through?
Code:
 crash = new Sound(this);
 crash.attachSound("crash");
 crash.start();
 
Re-create a mockup .fla & post it!

Regards,

cubalibre2.gif
 
My mockup works. And I don't know why.

I guess I'll keep cramming stuff into the mockup until it breaks.
 
Well, here's my mockup, but it works, unlike my actual file.


I tried to add in some of the elements from the original file, but I can't think of anything else that would be relevant to sound.
I guess I'll keep adding stuff until it breaks, but my original file has over 700 lines of actionscript, so can anyone suggest what I should keep an eye out for?
 
Well looking at a mockup .fla (which isn't available, btw) that works correctly wouldn't give us a clue as to why your main .fla may not be working. Guess you should post a link to that one!

Regards,

cubalibre2.gif
 
Well, I was going to post it, but I was in the midst of cutting a few hundred lines of code to save y'all some trouble, and I've found out where my problem was coming from.

It was this line:

Code:
beamer.stop();

The only sound-related command that I forgot to replicate in my mock-up, natch.

So, tell me. Why does stopping one sound stop other sounds, and how do I avoid this problem?
 
Well again hard to say without really looking at your .fla, but depending how you were manipulating that other sound, you might want to read up on this...
How to Control Independent Sound Objects Simultaneously..., here:


Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top