Mid-Atlantic Developer Conference - Call for Speakers

کلاس SWFSound



Class synopsis

SWFSound {
/* Methods */
SWFSound SWFSound::__construct ( string $filename [, int $flags = 0 ] )

Table of Contents

  • SWFSound — بازگرداندن شی SWFSound جدید برای فایل داده شده
add a note add a note

User Contributed Notes 1 note

egonbraun a t gmail d o t c o m
9 years ago
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.

= new SWFMovie();

$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->loopinpoint(1 * 100);

$i = $movie->add($img1);
$s = $movie->startSound($snd2);
$s->loopinpoint(1 * 100);
$i = $movie->add($img2);
$s = $movie->startSound($snd3);
$s->loopinpoint(1 * 100);
$i = $movie->add($img3);

$movie->setBackground(0xff, 0xff, 0xff);
$movie->setDimension(130, 97);
$movie->add(new SWFAction("gotoFrame(0); play();"));

To Top