
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
11
Availability
Flash Communication Server 1
Parameters
streamPath A string indicating the Uniform Resource Identifier (URI) of a stream.
The
streamPath parameter specifies the location and name of a stream relative to the directory of the application
instance. You can include a slash (/) as a delimiter between directories in the path. The last element in the path can
contain wildcard patterns (for example, a question mark [?] and an asterisk [*]) or a stream name. The
clearStreams() method traverses the stream hierarchy along the specified path and clears all the recorded streams
that match the given wildcard pattern. Specifying a slash clears all the streams that are associated with an application
instance.
To clear FLV, MP4, or MP3 files, precede the stream path with
flv:, mp4:, or mp3:. When you specify flv: or mp3:
you don’t have to specify a file extension; .flv and .mp3 are implied. However, when you call
application.clearStreams("mp4:foo"), the server deletes any file with the name “foo” in an mp4 container; for
example, foo.mp4, foo.mov, and foo.f4v. To delete a specific file, pass the file extension in the call; for example,
application.clearStreams("mp4:foo.f4v").
Note: If you don't precede the stream path with a file type, only FLV files are deleted.
The following examples show some possible values for the
streamPath parameter:
• flv:/ clears all FLV streams associated with the application instance.
• mp3:/ clears all MP3 files associated with the application instance.
• mp4:/ clears all MP4 streams associated with the application instance (for example, foo.mp4, foo.mov, and so
on).
• mp4:foo.mp4 clears the foo.mp4 file.
• mp4:foo.mov clears the foo.mov file.
• mp3:/mozart/requiem clears the MP3 file named requiem.mp3 from the application instance’s /mozart subdi-
rectory.
• mp3:/mozart/* clears all MP3 file from the application instance’s /mozart subdirectory.
• /report clears the report.flv stream file from the application instance directory.
• /presentations/intro clears the recorded intro.flv stream file from the application instance’s /presentations
subdirectory; if
intro is a directory name, no streams are deleted.
• /presentations/* clears all FLV files from the application instance’s /presentations subdirectory. The /presen-
tation subdirectory is also deleted if no streams are used in this namespace.
• /presentations/report?? clears all FLV files that begin with “report,” followed by any two characters. If there
are directories within the given directory listing, the directories are cleared of any streams that match
report??.
Returns
A boolean value of
true if the stream at the specified path was deleted; otherwise, false. If wildcard characters are
used to clear multiple stream files, the method returns
true only if all the streams that match the wildcard pattern
were successfully deleted; otherwise, it returns
false.
Example
The following example clears all recorded streams:
function onApplicationStop(){
Kommentare zu diesen Handbüchern