From: ming u. <mi...@ya...> - 2004-06-24 23:48:52
|
Hi, It looks to me that very few people uses the "swf flash format" capabilities about handling sounds... I asked a question some month ago, because i planned to use ming to create flash movies with sounds, either streamed and not-streamed sounds... http://sourceforge.net/tracker/index.php?func=detail&aid=907668&group_id=18365&atid=368365 Unfortunately i had to proceed without ming to make sound work on all my swf movies and stuff i was asked to create... What a shame.... For now, that my project is finished, i've a little time to come back to ming, i'd like to check with all of you, if ming "someday" will be able to work with sounds, without having to recompile each time all the ming sources, which seems very difficult as far as i noticed by myself... In april/may 2004 i added a "streammp3" function into the c, c++ modules to be able to do the same than the PHP "streammp3" function. I was about to send my contribution when some heavy modification about memory+garbage managment were done... and then i had no time to install these modifications and look if my streaming sounds were still working... If someone wants to have a look, i can send the "not updated upon memory/garbage management" modifications i made. I wondered if i was the only one to have the need for adding streaming sounds into a swf movie... I didnt succeeded in adding not-streaming sound functionalities to c and c++... My goal is to add sound to a ming-created swf movie with using as few actionscript as possible. You'll find enclosed some swf movie with sounds, like i'd wishes to create either with PHP and C,C++ ming applications. You'll find enclosed some "swf movies with sound" samples that i'd like to be able to create either with c,c++ and PHP... It seems to me that ming already as build in sound capabilities but there are no "official" interface to interact with... Bye, enjoy the "ming" ! ---------- <?php Ming_setScale(1.0); function makeRect($width, $height, $r, $g, $b) { $s = new SWFShape(); $ox = (int)(-$width/2); $oy = (int)(-$height/2); $s->setRightFill($s->addFill($r, $g, $b)); $s->movePenTo($ox, $oy); $s->drawLine($width, 0); $s->drawLine(0, $height); $s->drawLine(-$width, 0); $s->drawLine(0, -$height); return $s; } $mlen = 144; $blen = $mlen * 2.0/3; $m = new SWFMovie(); $m->setDimension($mlen, $mlen); $m->setBackground(0xff, 0xff, 0xff); $isound = $m->addSound(fopen("have_a_look.adpcm", "rb"), SWFSOUND_ADPCM_COMPRESSED | SWFSOUND_44KHZ | SWFSOUND_16BITS | SWFSOUND_STEREO); $b = new SWFButton(); $b->setUp(makeRect($blen, $blen, 0xff, 0, 0)); $b->setOver(makeRect($blen, $blen, 0, 0xff, 0)); $b->setDown(makeRect($blen, $blen, 0, 0, 0xff)); $b->setHit(makeRect($blen, $blen, 0, 0, 0)); $i = $m->add($b); $i->moveTo($mlen/2, $mlen/2); // (ibutton, Up, Over, Down, Hit) $m->setButtonSound($i, NULL, NULL, $isound, NULL); $m->save("button.swf"); ?> __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail |