Recipe 16.13. Clearing the Video Display


Problem

You want to clear a video display.

Solution

Call the clear( ) method of the Video object.

Discussion

When you close a NetStream object, it doesn't automatically clear the video display. The last frame of the video remains visible in the Video object until you either remove the Video object or call the clear( ) method. The following example clears a Video object by calling the clear( ) method.

video.clear(  );

You can remove a Video object from the display list by way of removeChild( ).

removeChild(video);




ActionScript 3. 0 Cookbook
ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers
ISBN: 0596526954
EAN: 2147483647
Year: 2007
Pages: 351

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net