sample #19
grabbing sound data
  1. <?php
  2. include("sample_utils.php"); // provides some utils and using mk
  3.  
  4. $swfFN = "clong.swf"; // file to extract sound
  5.  
  6. $si = new MKswf_inspector($swfFN); // the main decomposer class
  7. $soundObj = $si->find_firstTagID(SOUND); // find first sound data available
  8. $soundTD = $soundObj->get_tagData(); // we already know there is sound data
  9. // so skip error check, get tag data
  10. $sound1 = new MKsound_container($soundTD); // create specific sound object
  11. $sound1->dump_soundData(SERVER_MKTMP); // dump sound on file
  12.  
  13. $savedSoundFN = $sound1->get_soundFileName(); // file name is auto generated
  14. // if you wish different file name,
  15. // call set_soundFileName("yourfilename") first
  16.  
  17. $str = $savedSoundFN ." created in :<br />" .SERVER_MKTMP; // prepare to publish some response
  18. echo show_content($str, basename(__FILE__)); // publish response
  19. ?>

one of the neat feature of latest mk ssr is handling sound data. swf can store sound in various format, mp3 i used "as is" so it can be easely handled by mk. Other format can be grabbed though, but the format will remain as they are stored in swf.
In this sample the method dump_soundData provides to grab mp3 for further uses.
mikrokosmos