Can the flash player play .wav files from a url?

前端 未结 5 1563
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 06:54

Let\'s say I have a wav file at a url:

http://hostname.com/mysound.wav

I\'m trying to load the wav file with the sound class like:

5条回答
  •  旧时难觅i
    2020-12-09 07:14

    Flash itself does not support playing .wav files. Flash/Flex Builder compiles it directly into a Sound object ready to be played in your scripts, but for external .wav sound, the Flash SDK won't help you.

    You will need to read the .wav data yourself and make Flash play, or: there are a couple of third-party libraries around that do this for you. The above post uses popforge, here's tutorial that demonstrates as3wavsound playing an external .wav file from a URL:

    http://active.tutsplus.com/tutorials/media/quick-tip-play-external-wav-files-in-as3/

提交回复
热议问题