Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > NetStream > pause (NetStream.pause method) | |||
public pause([flag:Boolean]) : Void
Pauses or resumes playback of a stream.
The first time you call this method (without sending a parameter), it pauses play; the next time, it resumes play. You might want to attach this method to a button that the user presses to pause or resume playback.
Availability: ActionScript 1.0; Flash Player 7 - Note: This method is also supported in Flash Player 6 when used with Flash Media Server. For more information, see the Flash Media Server documentation.
flag:Boolean [optional] - A Boolean value specifying whether to pause play (true) or resume play (false). If you omit this parameter, NetStream.pause() acts as a toggle: the first time it is called on a specified stream, it pauses play, and the next time it is called, it resumes play.
The following examples illustrate some uses of this method:
my_ns.pause(); // pauses play first time issued my_ns.pause(); // resumes play my_ns.pause(false); // no effect, play continues my_ns.pause(); // pauses play
close (NetStream.close method), play (NetStream.play method)
Flash CS3