WMVideo Overview

The WMVideo commands allow you to play and control movie clips. With these commands you can set the on-screen position and size of the video, as well as control the volume, speed and time index. WMVideo can also send event notifications so that you can monitor, and respond to, events such as the end of a video, the "playhead" reaching a certain time index, or even when a video contains an embedded script to be run.

To make use of these commands, it is necessary for the client machine to have Windows Media Player 6 (WMP6) or newer installed, and that the necessary codec also be installed. The WMVideo object can only play one piece of media at a time.

Playing a movie clip is as simple as specifying which resource to load, setting it's size and position, and then telling it to play.

ssCore.WMVideo.setResource({resource:"c:\\MyVideoClip.avi"});
ssCore.WMVideo.setPosition({x:100, y:50});
ssCore.WMVideo.setSize({width:400, height:300});
ssCore.WMVideo.play();

By default, the WMVideo commands will attempt to create a WMP6 player. If this fails, SWF Studio will automatically try to create a WMP9 player (which in reality is compatible with WMP 7, 8, 9, and 10). If you have special requirements and do not wish to let SWF Studio choose the player version for you, then you can specify to exclusively use either the version 6 or version 9 player. For example:

ssCore.WMVideo.setVersion({version:"9"}); // WMP 7,8,9,10

This selection only needs to be done once, and must be the first WMVideo command in your application.