## Movie

#### Alternative name: Media

Functionality restricted under Linux

### Description

The 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
         ’

### Properties

align 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

### Methods

Click Clienttoscreen Close Create Delete Draw Focus Hide New Open Paint Play Poster Preview Resize Rewind Screentoclient Send Set Show Stop Trigger

### Callbacks

onClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onKeyDown onKeyPress onKeyUp onMouseDown onMouseMove onMouseUp onOpen onSend onShow onStop onUnFocus

Topic: APLX Help : System Classes : List of Classes : Movie

[ Previous | Next | Contents | Index ]