APLX Help : System Classes : List of Classes : Movie
|
|
![]() |
Movie |
Alternative name: MediaFunctionality restricted under Linux DescriptionThe Movie object class is used to play movies, audio clips, and other multi-media files from disk. Movies can be of two kinds, depending on the style property (you must set this at the time you create the Movie object, before setting the file property). If the Movie has a controller (which is the default, style = 0), it is displayed with a VCR-style control along the bottom edge, which lets the user play, stop, change the position in the movie. In this case, your program has no control over the playing of the movie, and no events are created. Alternatively, if the style is 1, the movie is played under control of your program using the Play, Stop and Rewind methods, and you can get an onMovieEnd callback when it completes. A style of 2 is similar, except that the movie once started plays continuously until the Stop method is called. No onMovieEnd callback is invoked. In each case, you set the file property to determine the movie (or other type of file) which is to be played. If this is set to an empty vector, a standard file selection dialog is displayed to allow the user to choose the movie. Selecting the movie also re-sizes the object to the original size of the movie, though you can change this later if you wish (movies display best if the size is an integral multiple of the original size, but can be stretched or compressed if you wish). The playing property is useful for finding out the current movie state. Cross-platform use: This class is fully implemented under Windows and MacOS, but under Linux only a sub-set of the functionality is available. The Linux implementation can play animated GIF files only (these are commonly used to display animated images in web pages). There is no support for sound. In addition, under Linux there is no movie-controller; style 0 is not implemented. Example∇DEMO_Movie;DEMO [1] ⍝ Sample function demonstrating use of the Movie object [2] DEMO←'⎕' ⎕NEW 'Window' ⋄ DEMO.title←'Movie Example' [3] DEMO.myMovie.New 'Movie' ⋄ DEMO.myMovie.where←0 0 ⋄ DEMO.myMovie.style←0 [4] ⍝ Set the file property to empty vector to put up selection dialog [5] DEMO.myMovie.file←'' [6] ⍝ [7] ⍝ Wait for the user to close the window [8] 0 0⍴⎕WE DEMO ∇ Propertiesalign anchors aquaadjust autodraw caption children class color data doublebuffered dragsource droptarget enabled events extent file handle maxsize methods minsize movieref name opened order playing pointer position properties range scale self size sourceformats style tabstop targetformats tie units visible volume where winptr MethodsClick Clienttoscreen Close Create Delete Draw Focus Hide New Open Paint Play Poster Preview Resize Rewind Screentoclient Send Set Show Stop Trigger CallbacksonClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onKeyDown onKeyPress onKeyUp onMouseDown onMouseMove onMouseUp onOpen onSend onShow onStop onUnFocus |
|
APLX Help : System Classes : List of Classes : Movie
|
Copyright © 1996-2010 MicroAPL Ltd