PHP Doku:: The SWFSound class - class.swfsound.html

Verlauf / Chronik / History: (50) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenMing (flash)The SWFSound class

Ein Service von Reinhard Neidl - Webprogrammierung.

Verdiene Geld mit Deiner Homepage oder deinem Blog: Setzte eine Textlinkwerbung und bestimme den Preis selber.
Einfach kostenlos anmelden und einen Platz auf Deiner Homepage anbieten.
Make money with your homepage or blog: Set a text link advertising and declare the price.
Register free of charge and offer a place on your homepage.
Ming (flash)

<<SWFShape->setRightFill

SWFSound>>


UnterSeiten:

The SWFSound class

Einführung

SWFSound.

Klassenbeschreibung

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

Inhaltsverzeichnis


Verdiene Geld mit Deiner Homepage oder deinem Blog: Setzte eine Textlinkwerbung und bestimme den Preis selber.
Einfach kostenlos anmelden und einen Platz auf Deiner Homepage anbieten.
Make money with your homepage or blog: Set a text link advertising and declare the price.
Register free of charge and offer a place on your homepage.
Ein BenutzerBeitrag:
- Beiträge aktualisieren...
egonbraun a t gmail d o t c o m
14.08.2008 18:52
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");
?>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)