<?php include("sample_utils.php"); // provides some utils and using mk $swfFN = "clong.swf"; // file to extract sound $si = new MKswf_inspector($swfFN); // the main decomposer class $soundObj = $si->find_firstTagID(SOUND); // find first sound data available $soundTD = $soundObj->get_tagData(); // we already know there is sound data // so skip error check, get tag data $sound1 = new MKsound_container($soundTD); // create specific sound object $sound1->dump_soundData(SERVER_MKTMP); // dump sound on file $savedSoundFN = $sound1->get_soundFileName(); // file name is auto generated // if you wish different file name, // call set_soundFileName("yourfilename") first $str = $savedSoundFN ." created in :<br />" .SERVER_MKTMP; // prepare to publish some response ?>
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.
![]()