Flash 5: Sounds!

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
Kamineko
Baaaaaaa!
Baaaaaaa!
Posts: 7569
Joined: Fri Dec 17, 2004 2:53 pm 0
Contact:

Flash 5: Sounds!

Post by Kamineko »

Is it possible to load audio from an external file using Flash 5?

I'm trying to figure out a way to be able to load the sounds from the server without putting them into the movie and exporting them from the Library.

I know future versions let the Sound object load sounds with the .loadSound() method, but Flash 5 doesn't have this.
Last edited by Kamineko on Fri Sep 15, 2006 6:34 am 0, edited 1 time in total.
User avatar
chris_b
Baaaa!
Baaaa!
Posts: 961
Joined: Sun Dec 12, 2004 2:50 pm 0
Location: UK
Contact:

Post by chris_b »

I don't have Flash 5 anymore but from what I remember I think the best you can do is embed the sound in a simple .swf and use loadmovie()...so in theory I guess it'd maybe be possible to call a server-side script which dynamically wraps the sound into a .swf (but it'd probably be easier to just get a newer version of Flash)
User avatar
Kamineko
Baaaaaaa!
Baaaaaaa!
Posts: 7569
Joined: Fri Dec 17, 2004 2:53 pm 0
Contact:

Post by Kamineko »

Hmmm...

I've come across more sound problems with Flash 5.

I'd like to be able to load an control a sound using Actionscript, but I don't know if I can...

If I load in an external movie with the sound in the library, and I can make trigger frames in the external movie which start and stop the sound.

However, I can't do anything about the volume of the sound because it needs the Sound object which is in Flash >5... any ideas?
User avatar
handcircus
Baaa!
Baaa!
Posts: 129
Joined: Tue Jul 20, 2004 4:36 pm 0

Post by handcircus »

if you have it as an event on the frame, could you create multiple frames, with a different volume for each, ie sound1volume1, sound1volume2, sound1volume3 etc? Then you just gotoAndStop("soundvolume2") to get that volume.

I thought flash 5 had the sound object, for using with attachSound?
http://www.handcircus.com - game and interaction design
http://handcircus.blogspot.com - blog
User avatar
Kamineko
Baaaaaaa!
Baaaaaaa!
Posts: 7569
Joined: Fri Dec 17, 2004 2:53 pm 0
Contact:

Post by Kamineko »

Yup. You're right.

It's got a sound object but I can't import from external sources. That's okay. :)

Cheers.
Post Reply