custom controls for wmv video!!!

Mac Director doesn't offer a video controller for *.wmv videos like it does for *.mov videos. So we have to create our own controls.

All you need to do is add the needed codes to your sprites, that is your text, image or buttons that may control (pause, stop, play, rewind) the video.

The following stops the video from play and sets the playtime of the video to 0. Thus the video will begin from the start when the play 'button' is again.

Snippet 1

  1. on mouseUp me

  2. sprite("video").stop()

  3. end

This begins playtime for the video.

Snippet 2

  1. on mouseUp me

  2. sprite("video").play()

  3. end

The following pauses the video and the playtime is not reset. Thus, once the play 'button' is used again the video will continue to play where it was paused.

Snippet 3

  1. on mouseUp me

  2. sprite("video").pause()

  3. end

This resets the playtime of the video and thus the video once again re-starts.

Snippet 4

  1. on mouseUp me

  2. sprite("video").rewind()

  3. end

For all codes above, one needed not use the mouseUp handlers. If you wanted a video to begin playing/ to stop / to rewind or to pause once the cursor is in a particular region then you could have used the handler:

on mouseWithin me

Also, do note that you didn't have to use the sprite name video as in the line sprite("video")... You could simply use the channel number in which the movie sprite is located.