Flash Player Debugger on Ubuntu

After having spent a good part of an hour on trying to install the Flash Player Debugger for FireFox on Ubuntu 11 64-bit, I found the following steps worked:

  1. sudo apt-get install nspluginwrapper
  2. copy libflashplayer.so (from debugger download) to /usr/lib/flashplugin-installer/
  3. sudo nspluginwrapper -i /usr/lib/flashplugin-installer/libflashplayer.so
  4. restart FireFox

Thanks to: AskUbuntu.com.

Don’t forget to set up mm.cfg.

When all is done, run:

tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt

Sound from ByteArray

While writing a quick test application to record microphone input and playing that same recording, I found out that playing back a ByteArray directly using the Sound class wasn’t possible. Luckily a solution is never far away when doing a Google search and it turns out that FlexibleFactory has a good solution: the MP3FileReferenceLoader lib. With a bit of tweaking you can pass in a ByteArray directly and don’t need to rely on a FileReference.

Good news though! As per Flash Player 11, the following 2 methods have been added to the (native) Sound class that can be used to achieve the same behaviour:

  • Sound.loadCompressedDataFromByteArray(bytes:ByteArray, bytesLength:uint)
  • Sound.loadPCMFromByteArray(bytes:ByteArray, samples:uint, format:String = “float”, stereo:Boolean = true, sampleRate:Number = 44100.0)