Multimedia
Media Files
Purpose: |
Play an animation file created with VisualNEO Win’s NeoToon utility. |
||||||
Category: |
Multimedia |
||||||
Syntax: |
PlayCartoonFile "start x" "start y" "end x" "end y" "file name" "times" "delay" "mode" start x, start y, end x, end y The screen coordinates where the animation will begin and end. The animation will travel between the two points. Coordinates are relative to the upper left corner of the publication window’s. file name The name of the cartoon file (CAR) to play. times The number of times the animation will cycle between the start and end points. delay Number of milliseconds to pause between each frame. mode One of the following:
You can use the StopMedia Action to halt a cartoon in progress. |
||||||
Example: |
The following example plays a cartoon file that follows a trajectory from the top left of the publication to the lower right: PlayCartoonFile "10" "10" "630" "470" "c:\samples\fish.car" "30" "25" "Normal" You can create a cartoon file that remains stationary (does not follow a trajectory) by making the start and end coordinates the same. For example: PlayCartoonFile "25" "10" "25" "10" "c:\samples\fish.car" "30" "25" "Loop" |
Purpose: |
Play a digital audio (WAVE) or music (MIDI) sound file. |
||||||
Category: |
Multimedia |
||||||
Syntax: |
PlaySoundFile "file name" "mode" file name The name of the sound file to play. mode One of the following:
You can use the StopMedia Action to halt a sound in progress. |
||||||
Example: |
PlaySoundFile "c:\windows\media\ding.wav" "Loop" |
Purpose: |
Play a video (AVI/MPEG/etc.) file. |
||||||
Category: |
Multimedia |
||||||
Syntax: |
PlayVideoFile "left" "top" "width" "height" "file name" "mode" left, top The coordinates of the video’s left, top corner relative to the publication window. To center the video on the screen, enter “-1” for both. width, height The desired with and height of the video. Substitute “-1” for both to use the video’s actual dimensions. file name The name of the video file to play. mode One of the following:
You can use the StopMedia Action to halt a video in progress. |
||||||
Example: |
PlayVideoFile "-1" "-1" "-1" "-1" "c:\samples\sales.avi" "Wait" |
Note: AVI files are generally the best choice if you plan on including video in your publications. The necessary drivers for playing most types of AVI files are incorporated into Windows, while many other video formats require that special software be installed. For example, before playing MPEG videos, you (and your readers) may need to install Microsoft’s ActiveMovie™ driver. ActiveMovie is included with most newer versions of Windows, but for older installations, you may need to download the driver from www.microsoft.com.
Purpose: |
Stop a currently playing media file (sound, video or animation). |
Category: |
Multimedia |
Syntax: |
StopMedia "file name" file name The name of the media file to stop. Leave file name blank to stop all playing media. Use “Sound” instead of a file name to stop all audio (WAV, MID) files or “Video” to stop all video (AVI, CAR, etc.) files. |
Example: |
StopMedia "c:\sounds\frogs.wav" |
Windows MCI
Purpose: |
Send a command to the Windows Media Control Interface (MCI). This Action provides high-level access to multimedia devices attached to your computer. (See PlaySoundFile and PlayVideoFile for alternative methods of playing multimedia files.) |
Category: |
Multimedia |
Syntax: |
MCICommand "command string" command string A formatted MCI command string. Possible MCI commands include: Play filename/device {start position} {stop position} Device indicates the type of multimedia player the command is intended for. Items surrounded in braces { } are optional. For more information about MCI commands, refer to the Windows SDK documentation available from Microsoft. If the MCICommand is successful, the global variable [MCIResult] will contain a 0 (zero), otherwise [MCIResult] will contain an error number. |
Example: |
The following example plays a simple wave file and displays an AlertBox if an error occurs: MCICommand "play c:\windows\media\ding.wav" This example plays the sixth track on an audio CD: MCICommand "open cdaudio" This example plays an AVI video in a window: MCICommand "open demo.avi alias avi1" |
Simple Sounds
Purpose: |
Play a tone (specified in Hertz) using the internal PC speaker. |
Category: |
Multimedia |
Syntax: |
PlayTone "frequency" frequency The frequency in Hertz of the tone to play. Middle “C” is approximately 440 Hertz. |
Example: |
PlayTone "440" |
Purpose: |
Play an error-type tone on the internal PC speaker. |
Category: |
Multimedia |
Syntax: |
SoundBuzzer |
Example: |
SoundBuzzer |
Purpose: |
Play a default system sound defined in the Windows Registry. System sounds can vary from computer to computer since Windows allows users to customize these settings to suit their individual tastes. These sounds may be changed using the Windows Control Panel. |
Category: |
Multimedia |
Syntax: |
SystemSound "sound type" Sound type One of the following: SystemDefault, SystemAsterisk, SystemExclamation, SystemStop or SystemQuestion. |
Example: |
SystemSound "SystemExclamation" |
Volume Control
Purpose: |
Get the speaker volume level for a specific device. Windows provides separate volume controls for each audio device. Device types that can be accessed with this Action include: Digital Audio (Wave), Musical Instrument (Midi), CD, Line Input (LineIn), Microphone, Auxiliary (AUX) and Master Volume (Master). |
Category: |
Multimedia |
Syntax: |
GetVolume "device" "variable" device The name of an audio device: Wave, Midi, CD, LineIn, Microphone, Aux or Master. variable The name of the variable to store the device volume. The volume level retuned will be between 0 (off) and 255 (maximum). |
Example: |
GetVolume "WAVE" "[Vol]" |
Purpose: |
Set the speaker volume level for a specific device. Windows provides separate volume controls for each audio device. Device types that can be controlled with this Action include: Digital Audio (Wave), Musical Instrument (Midi), CD, Line Input (LineIn), Microphone, Auxiliary (AUX) and Master Volume (Master). |
Category: |
Multimedia |
Syntax: |
SetVolume "device" "volume level" device The name of an audio device: Wave, Midi, CD, LineIn, Microphone, Aux or Master. volume level The new volume level - a number between 0 (off) and 255 (maximum). |
Example: |
SetVolume "WAVE" "100" |