Ultrashock Forums > Flash > ActionScript
AS3 - Sound Archive (programming)
Member Blogs
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
AS3 - Sound Archive (programming)
Old 2008-07-08

This isn't a question - more a general discussion of pros and cons.

I AS2 i did a soundarchive so my games pulled the (preloaded) sounds from my archive. I had to create a MC for each sound (otherwise they could be controlled seperately). It worked fine but i had a crappy feeling about it.

Now i'm doing a similar soundproject in AS3. And i want to do it right.
I'm creating a game containing sound for units, the gui, backgroundmusic etc.
I want to do a general sound archive i can use in the future.

On one hand i'd prefer to have the sound ready once playing the game (or using the app) on the other it seems a waste to preload everything - both time and memory wise.

AS3 can buffer sounds so maybe that is a solution? Or should i just create a SoundChannel for each sound?
If i need an instant response from some of the sound (= no preload/buffer) a mix could probably prove wise.

Any comments/ideas/solutions.

And yes - if we find solutions that proves to work generally i'll share my code.
postbit arrow 1 comment | 188 views postbit arrow Reply: with Quote   
TorDK
Registered User
TorDK is offline
seperator
Posts: 33
2003-02-03
Age: 29
TorDK lives in Denmark
seperator

Ultrashock Member Comments:
iasseo iasseo is offline iasseo lives in United States 2008-07-09 #2 Old  
yea - I would probably create a sound channel for each sound, and a class that would listen to different Events to control these channels. Loading the sounds at startup would probably be best so you can fire them at will...
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: