Adding Animation to Windows Help

A look at two new animation toolkits

Peter Kent

Peter is a consultant specializing in creating WinHelp files and training new WinHelp authors, and has written 11 computer books on various topics. He can be contacted at 303-989-1869 or on CompuServe at 71601,1266.


As Al Stevens pointed out in his article, "Help for Windows Help Authors" (DDJ, April 1994), a Windows app must provide online help if it is to be taken seriously by users. In fact, the demand for sophisticated, flashy Windows help systems including everything from animation to audio has grown since Al examined help tools and techniques. Animation in particular is useful for recording a short tutorial that demonstrates how to use an application. However, none of the tools Al looked at provided a direct way to add animation to a help file. Movie Development Kit, from Lantern, and DEMOquick, from AMT, are two toolkits that let you add animation to Windows help files. You can link animations to buttons or hot spots, record user actions for interactive tutorials, and create animations by capturing individual frames in a graphics program. You can also run animations independently of Windows Help files. Another tool similar to the two discussed here will be available from Blue Sky Software, makers of RoboHelp; however, at this writing, this tool has not yet been released.

Movie Development Kit

The Movie Development Kit provides a simple, low-cost way of recording animations and embedding them into other applications. In addition to the ability to record frames from either a window or the entire screen, the toolkit's features include capture and playback tools; a device-independent file format for displaying 16, 256, or more colors; and a scripting language that allows you to create self-running demos, slide shows, and so on.

The Movie Development Kit provides a number of ways to record frames. You can click on the Snap button in the program's remote-control dialog box, use a keyboard shortcut, or click on the Movie icon with the right-hand mouse button. You can also configure Movie to take snapshots automatically. You do this either by setting up a time interval, or configuring Movie to take a snapshot when you click the mouse button, press a key, or immediately before or after the capture window repaints (Movie watches for the WM_PAINT message).

One useful feature of Movie is its ability to record the mouse pointer in each frame. If you're creating a tutorial, for instance, you'll probably make use of this. However, you may want to omit the pointer from the frames if you are creating other types of animation. Once you've recorded the animation, you can play it back frame by frame or all together, but there are no tools for deleting frames or adding notes to the animation. Movie provides a facility for creating distribution disks containing the animations.

To use a Movie animation with a Windows Help file, you must place the animation in an embedded window inside a Help topic. In WinHelp, embedded windows are created using the {ew} command in the .RTF file. (If you are using an authoring tool such as ForeHelp or Doc-to-Help, you may never see the .RTF codes; nonetheless, the authoring tool is entering codes such as these into the .RTF file for you.) For instance, to run an animation when a topic opens, add the command {ewc VoyEwh.dll, VoyEwhMovie, ;ID=1 ;File=filename.mov ;AutoPlay} to the .RTF file. In this command, ew is the embedded-window command, c places the embedded window in the center of the topic, VoyEwh.dll is the Movie .DLL file that runs the animation, VoyEwhMovie is the class name, ID=1 is an identification number for this instance of the movie, File=filename.mov is the name of the file you created when you recorded the animation, and AutoPlay is a parameter that tells the .DLL to play the animation the first time the topic is entered. There are a number of other parameters: You can display a border around the embedded window; play specific frames; play in ping-pong mode (so it plays one way and then reverses); create sliders, Play buttons, and Stop buttons; control the frame number on the embedded window; and modify the speed at which the animation plays.

Movie also includes a number of macros that allow the user to control a movie from text and graphic hot spots. These macros can be used to modify animation speed, copy a frame to the clipboard, display a particular frame, play the animation, stop the animation, or place a frame number in the animation. You register Movie macros using WinHelp's RegisterRoutine macro. This is placed in the [CONFIG] section of the project's .HPJ file with a command such as RegisterRoutine(`VoyEwh.dll' `macroname', `parameterspec'), where VoyEwh.dll is the .DLL containing Movie's macros, macroname is the macro you want to use, and parameterspec is the parameters passed to the macro, usually ui. Once registered, the macros can be used in the same way you use WinHelp's standard macros--you can run them from hot spots, buttons, or when a topic or the Help project opens.

Movie also lets you store the .MOV file as baggage within the .HLP file. Baggage is added to a Help project by simply naming the baggage file in the [Baggage] section of the project's .HPJ file. When you compile the .HLP file, the .MOV file will be stored inside. Of course, there are several other files that can't be placed as baggage inside the .HLP file but must be installed in the \WINDOWS\SYSTEM directory before the animation can be run.

DEMOquick

DEMOquick provides an easier way to record animations and lets you quickly and easily add notes to your tutorials. In fact, you can add voice if you want to get fancy. You'll start by using Mimic, an accessory program, to record your animation or tutorial in an .AVI video file. You have several recording options. You can record a frame on any mouse action--button up or button down on any specified button. You can also record on a key-up or key-down event, when you press a hot key that you have defined, or when you click on a button in a control box. Mimic also lets you filter out double mouse clicks and the Shift, Alt, and Ctrl keys, so double clicks and keyboard combinations won't give you two frames.

As with Movie, you can also use Mimic to record the mouse pointer, but you won't usually want to do so, because DEMOquick can simulate smooth pointer movements. The only reason to capture the mouse pointer in Mimic is if you are creating single frames for some purpose other than creating an animation and want to show the pointer position.

Setting up and starting the recording takes just a minute or two. You can capture a full screen or the active window, and while you can't change the capture area during a recording session, you can change other capture options, such as the key and mouse triggers.

Editing the Animation

The real benefits of DEMOquick become clear once you've finished recording the animation and begin editing. You can group several .AVI files together into one sequence, then create pop-up messages and insert them into the animation. You can also use a variety of other options, such as inserting music and voice, bit-mapped graphics, or other .AVI files; specifying the type of mouse pointer you want to use; or adding a border and specifying its color.

Adding popups to an animation is straightforward: Use the scroll bar at the top of the DEMOquick control panel to move to the frame at which you want to add the popup, then click on the Add Popup button. DEMOquick places the box on the screen. Click on the PopUp Options button and you can modify the box--add title and scroll bars, modify the text and background color, and select a font size. You can also drag the pop-up border and title to modify its size and position. Then, to add text to your popup, just place the cursor in the box and type. (DEMOquick lets you export all your pop-up-note text, check the spelling in your word processor, then reimport the corrected text.) When you've finished creating the first pop-up note, you can continue moving through the animation, adding more pop-up notes as desired.

When you are editing, the popups contain Cut, Paste, Copy, and Delete buttons; in the final, compiled animation, the popups have buttons that let the user move around in the animation, quit, or modify the animation speed. Using DEMOquick's Other Options dialog box you can even add a button of your own--this can be used to run an external program from within the animation.

Adding other components to the animation is also fairly simple. You can place a .BMP, .WMF, or .ICO file within a frame, and position it exactly. You could use this feature to add arrows, for instance, pointing from the popup to the part of the screen to which you wish to direct your audience's attention. You can also insert a single frame from an .AVI video file, play the entire file, or crop a frame so that only a part of it appears.

DEMOquick lets you add Waveform and MIDI files. Again, adding them is a very simple process. You can even record the .WAV sound directly into the animation file, providing a simple way to add a voice-over to your animation to explain the next step in your tutorial. DEMOquick also provides a number of run options. You can modify the animation's border color (if you recorded an area less than full screen), define how quickly the animation will run, select the type of mouse pointer to be used (or turn the pointer off between specified popups), and set the location of the animation on the screen.

Virtual-Help

To use macros to link your DEMOquick tutorials to your help file you'll need a $300 accessory application called "Virtual-Help." Instead of placing the animation in an embedded window within the Help file, a WinHelp macro creates a DDE link to the DEMOrun program, which then takes over and displays a full-screen animation outside the Help file. The user is returned to the help file when the animation is closed. The person using the Help file can actually switch between the animation and the Help file using normal Windows task-switching procedures, such as Alt-Tab. This is similar to the way in which the Help system in Word for Windows 6.0 runs its demos--outside WinHelp, in a full-screen application. (With Word 6.0 demos, though, the user can't leave the demo without closing it.)

You can attach WinHelp macros to buttons and graphic or text hot spots. For instance, to allow the user to run a demo by clicking on hot-spot text, you'd use the macro !ExecProgram(`DDELINK RUN/AUTOSTART= filename'0), where ExecProgram is the WinHelp macro used to run external programs from within WinHelp, DDELINK RUN is the command that starts the DDE link (which in turn runs DEMOrun), /AUTOSTART= is the parameter that tells DEMOrun to start a demo, filename is the name of the demo you want to start, and 0 is the ExecProgram parameter that defines the application's display state (for DEMOrun, you would always use 0). The hidden text is placed after the hot-spot text in the .RTF file and the tutorial will run when the user clicks on this text. The user is returned back to the Help file when the tutorial is closed.

While the tutorial is running, the user has a few options. The pop-up windows have forward and back buttons--the forward button runs the next few frames, stopping at the next popup, while the back button simply displays the previous popup and its associated frame, allowing the user to run through the step again. There's also a Jump button which lets the user return to the start of the tutorial or adjust the speed.

Experiences

Although placing Movie animations in a Help file is a simple procedure, I found recording animations a little awkward. Defining the area of the animation is difficult. For instance, clicking the clipboard mouse pointer often grabs the window without the title bar, though you can define an area by rubber-banding around it with the pointer. In addition, the mouse and key triggers don't work well: In some applications, you can't use them at all; in others, the mouse may work but not the keyboard; and in all cases, they only work in a single application. If your tutorial spans two or more applications, the mouse and key triggers stop working when you enter the second program. These problems make recording more difficult than it should be, and getting a smooth mouse-pointer motion in the tutorial takes some effort.

Another major drawback in Movie is its inability to add notes directly to your tutorial. To overcome this, you could break the tutorial down into several small animations, using a macro to run each piece from the Help file and interspersing the bites with notes built into the Help topic itself. Alternately, you could simply record frames with text inside some kind of text box--Notepad, for instance--within the animation. But that's a lot of trouble.

DEMOquick and DEMOrun are also not without their problems. Norton Desktop interferes with recording animations, and if you are running PC Tools for Windows Desktop, the animation may not play properly. In some cases, an incompatible sound driver might cause an error message to appear each time the animation tries to play a sound (AMT plans to fix this by disabling the animation's sound the first time the problem occurs). DEMOrun also has a few memory problems. When system resources are below about 35 percent, DEMOrun may not start. Additionally, DEMOrun's DR_PRO.EXE program stays in memory when you quit; you have to use a macro from the Help file to remove the program from memory before the Help file is closed. Occasionally, you can't get DEMOrun to start if one instance of the program is already open. The problems are compounded by documentation that is unclear in places.

Conclusion

The Movie Development Kit is fine for creating simple animations that contain little or no additional text or audio information. Some of its problems are a little troubling, though. DEMOquick, on the other hand, costs a bit more, but its stronger editing features facilitate more advanced tutorials with text notes, smooth mouse scrolling, voice, and music.

For More Information

Movie Development Kit 4.01.

Retail Price: $299.00

Lantern Corp.

63 Ridgemoor Drive

Clayton, MO 63105

314-725-6125

DEMOquick 2.13 with Virtual-Help option

Retail Price: $790.00

AMT Learning Solutions Inc.

183 Guggins Street

Boxborough, MA 01719

508-263-3030


Copyright © 1994, Dr. Dobb's Journal