MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Uživatelský manuál Strana 108

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 155
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 107
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
105
// Set up the server stream.
application.myStream = Stream.get("foo");
if (application.myStream){
// This server stream plays "Live1",
// "Record1", and "Live2" for 5 seconds each.
application.myStream.play("Live1", -1, 5);
application.myStream.play("Record1", 0, 5, false);
application.myStream.play("Live2", -1, 5, false);
}
The following example combines different streams into a recorded stream:
// Set up the server stream.
application.myStream = Stream.get("foo");
if (application.myStream){
// Like the previous example, this server stream
// plays "Live1", "Record1", and "Live2"
// for 5 seconds each. But this time,
// all the data will be recorded to a recorded stream "foo".
application.myStream.record();
application.myStream.play("Live1", -1, 5);
application.myStream.play("Record1", 0, 5, false);
application.myStream.play("Live2", -1, 5, false);
}
The following example calls Stream.play() to stop playing the stream foo:
application.myStream.play(false);
The following example creates a playlist of three MP3 files (beethoven.mp3, mozart.mp3, and chopin.mp3) and
plays each file in turn over the live stream
foo:
application.myStream = Stream.get("foo");
if(application.myStream) {
application.myStream.play("mp3:beethoven", 0);
application.myStream.play("mp3:mozart", 0, false);
application.myStream.play("mp3:chopin.mp3", 0, false);
application.myStream.play("mp4:file1.mp4", -1, 5, false);
}
The following example plays an MP4 file:
application.myStream = Stream.get("foo");
if(application.myStream) {
application.myStream.play("mp4:beethoven", 0);
application.myStream.play("mp4:mozart", 0, false);
}
In the following example, data messages in the recorded stream file log.flv are returned at the intervals at which
they were originally recorded:
application.myStream = Stream.get("data");
if (application.myStream) {
application.myStream.play("log", 0, -1);
}
In the following example, data messages in the recorded stream file log.flv are returned all at once, rather than at
the intervals at which they were originally recorded:
application.myStream = Stream.get("data");
if (application.myStream) {
application.myStream.play("log", 0, -1, 2);
}
Zobrazit stránku 107
1 2 ... 103 104 105 106 107 108 109 110 111 112 113 ... 154 155

Komentáře k této Příručce

Žádné komentáře