Home

Creating swf audio files without flash

Required materials:
  1. Audacity is a free audio tool. Use it to record a .wav of something you want in swf.
  2. Then encode your wav file to mp3 like so: lame -k -s 22.05 --cbr sound.wav sound.mp3
  3. We use -s 22.05 because openlaszlo only allows certain bitrates (11.025, 22.05, and 44.0), --cbr is for Constant Bit Rate, and -k says to not mess with existing frequencies

  4. Openlaszlo is a free xml language that can compile into swf or dhtml. Create a .lzx file and use this template:
    <canvas>
    <resource name="sounds" src="mysound.mp3" />
    <script>
    LzAudio.playSound("sounds");
    </script>
    </canvas>
    
  5. And then compile your lzx file with lzc --runtime=swf8 file.lzx.
  6. Now move your file.lzr=swf8 (the output from lzc) to a more sane file.swf in htdocs/ and you're done!