note 85104 added to class.swfsound

From: Date: Thu, 14 Aug 2008 16:52:04 +0000
Subject: note 85104 added to class.swfsound
Groups: php.notes 
Request: Send a blank email to php-notes+get-143503@lists.php.net to get a copy of this message
Just an example of how to use this class. It just cerates a serie of three images with a background sound in each one of them. <?php $movie = new SWFMovie(); $movie->setRate(1); $img1 = new SWFBitmap(fopen('./tmp/img1.jpg', 'rb')); $img2 = new SWFBitmap(fopen('./tmp/img2.jpg', 'rb')); $img3 = new SWFBitmap(fopen('./tmp/img3.jpg', 'rb')); $snd1 = new SWFSound(fopen('./tmp/1.wav', 'rb'), SWF_SOUND_22KHZ|SWF_SOUND_16BITS|SWF_SOUND_MONO); $snd2 = new SWFSound(fopen('./tmp/2.wav', 'rb'), SWF_SOUND_22KHZ|SWF_SOUND_16BITS|SWF_SOUND_MONO); $snd3 = new SWFSound(fopen('./tmp/3.wav', 'rb'), SWF_SOUND_22KHZ|SWF_SOUND_16BITS|SWF_SOUND_MONO); $s = $movie->startSound($snd1); $s->loopcount(1); $s->loopinpoint(1 * 100); $i = $movie->add($img1); $i->setDepth(1); $movie->nextFrame(); $s = $movie->startSound($snd2); $s->loopcount(1); $s->loopinpoint(1 * 100); $i = $movie->add($img2); $i->setDepth(2); $movie->nextFrame(); $s = $movie->startSound($snd3); $s->loopcount(1); $s->loopinpoint(1 * 100); $i = $movie->add($img3); $i->setDepth(3); $movie->nextFrame(); $movie->setBackground(0xff, 0xff, 0xff); $movie->setDimension(130, 97); $movie->add(new SWFAction("gotoFrame(0); play();")); $movie->nextFrame(); $movie->save("bw.swf"); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 201.83.49.130 ---- Manual Page -- http://www.php.net/manual/en/class.swfsound.php Edit -- https://master.php.net/note/edit/85104 Del: integrated -- https://master.php.net/note/delete/85104/integrated Del: useless -- https://master.php.net/note/delete/85104/useless Del: bad code -- https://master.php.net/note/delete/85104/bad+code Del: spam -- https://master.php.net/note/delete/85104/spam Del: non-english -- https://master.php.net/note/delete/85104/non-english Del: in docs -- https://master.php.net/note/delete/85104/in+docs Del: other reasons-- https://master.php.net/note/delete/85104 Reject -- https://master.php.net/note/reject/85104 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#143503) next »