home *** CD-ROM | disk | FTP | other *** search
/ Doom Univers Paralleles / DoomUniversParalleles.iso / aawin / aapldev.doc < prev    next >
Text File  |  1991-10-16  |  103KB  |  2,295 lines

  1.                 Autodesk Animator Windows Player
  2.  
  3. AAPLAY.DLL - AA Play Library
  4.  
  5. AAPLAY.DLL is a dynamic link library which will play Autodesk An-
  6. imator animation  files and  Windows  device  independent  bitmap
  7. files.
  8.  
  9. Using AAPLAY.DLL,  applications can load, play and control anima-
  10. tions under  windows. AAPLAY  can use Autodesk Animator Files, or
  11. Windows Device  Independent Bitmap  Files. AAPLAY.DLL can play an
  12. animation inside  of a  window, or  it will  take over the entire
  13. screen for animation playing.
  14.  
  15. AAPLAY.DLL can  play MIDI music, digitized sound, or Compact Disk
  16. Redbook Audio with animations.
  17.  
  18. AAPLAY.DLL can  also manage  animation scripts.  Scripts are text
  19. files which  contain animations  to be  played in  a given order.
  20. AAPLAY.DLL can  be  used  to  create,  edit  and  play  animation
  21. scripts.
  22.  
  23. When using  full screen  animations, the display can no longer be
  24. shared. AAPLAY.DLL  will not  allow any  other animations to play
  25. while a  full screen  animation is  playing. Their status will be
  26. playing, but  no action  will actually  be taking place. When the
  27. current full  screen animation  is stopped,  the next full screen
  28. animation is  selected for  playing. If  there are no full screen
  29. animations to  be played,  AAPLAY.DLL will  return the  screen to
  30. windowed mode.
  31.  
  32. The C language header file aaplay.h makes all of the declarations
  33. needed for using the AA Play Library. This document also includes
  34. the C  language names,  and the actual values of constants needed
  35. for the  AA Play Library. In the following description, TRUE rep-
  36. resents a non-zero value, and FALSE is a zero value.
  37.  
  38. A smaller  version of the library is available with the sound and
  39. scripting features  removed. A library call can be made to deter-
  40. mine the  capabilities of the player. Features not in the limited
  41. version are indicated in this document.
  42. Windows Initialization - WIN.INI, and SYSTEM.INI
  43. The Windows  player uses  some entries in the Windows initializa-
  44. tion file,  WIN.INI. These  values are kept in the section named,
  45. [AAPLAY Animation]. The values are:
  46.  
  47.              FullScreen=driver
  48.                 
  49.                 Gives the  driver used for full screen animation.
  50.                 Currently only  the VGA  is supported. The driver
  51.                 for the  VGA is AAVGA.DLL. If this value is miss-
  52.                 ing, full screen animations can not be done.
  53.  
  54.              DualScreen=value
  55.                 Value indicates  whether the  full screen  anima-
  56.                 tions are run on the same display as Windows. The
  57.                 player assumes  the display  is shared by Windows
  58.                 and full  screen animation,  unless this  line is
  59.                 present and value is yes, true, on, or a non-zero
  60.                 number.
  61.  
  62. If you  are planning  to run  Windows on a display different from
  63. the VGA  and run full screen animations, you must add the follow-
  64. ing line  to the  [386enh] section  of the  file SYSTEM.INI. This
  65. line will  prevent Windows  from attempting  to place the VGA ad-
  66. dress space in the page frame for expanded memory.
  67.  
  68.              EMMExclude=A000-AFFF
  69. Special Considerations
  70. There are  several differences  between running animations in the
  71. Windows environment  and the  DOS environment. The following con-
  72. siderations should be made when authoring for Windows.
  73.  
  74. Colors Under Windows
  75.  
  76. The following  discussion of color is not applicable when running
  77. animations in full screen mode under Windows.
  78.  
  79. Colors must  be considered for animations that are to be run in a
  80. window under  the Windows  Environment. Two  color  problems  can
  81. arise. Windows  on the  standard VGA uses the 640 by 480 16 color
  82. mode. Animations  that use many colors will not be displayed cor-
  83. rectly, in  this case. If you are make animations to be played in
  84. a window  on a  standard VGA,  you should limit your color selec-
  85. tion. The 640 by 480 16 color mode also does not support changing
  86. colors in an animation.
  87.  
  88. For displays  with more  colors, a  mechanism for  managing color
  89. palettes was  implemented in  Windows 3.0. This mechanism is used
  90. by the  player to  display animations in a window. There are some
  91. unpleasant side effects that can occur when animation palettes do
  92. not conform to the Windows palette management.
  93.  
  94. First, Windows  reserves twenty  colors for  its own use, so only
  95. 236 colors  are available for the animation. However, if the col-
  96. ors in  an animation  do not change, Windows will match colors in
  97. the animation  and animations  using 256 colors will display cor-
  98. rectly.
  99.  
  100. Normally, when  Windows changes the palette, a message is sent to
  101. every window  begin displayed,  informing  the  window  that  the
  102. palette has  been changed.  While these  messages are being sent,
  103. other activity  in the  system is  suspended,  including  playing
  104. other frames  of the animation. So palette changes, either within
  105. an animation or between to successive animations in a script, can
  106. cause pauses  while the animation is playing. When the palette is
  107. changed, Windows  also may  change the  colors being  used on the
  108. display. This means that the animation really needs to be re gen-
  109. erated in  order to correctly display. If the color change is be-
  110. tween animation in a script, the first frame of the new animation
  111. will correct  the colors.  But, if  the color change is within an
  112. animation, Windows  can fix  up the  colors pretty  well, but not
  113. completely accurately.  So  some  colors  in  the  animation  may
  114. change.
  115.  
  116. If color  palette effects  are desired,  the player  can  reserve
  117. palette entries  to be  used for  the effects.  Three options are
  118. provided, no  color entries  are ever reserved, the color entries
  119. are reserved  when the player finds that the colors are changing,
  120. or all  of the color entries are reserved. When color palette en-
  121. tries are  reserved, they  are not  available for color matching,
  122. and so  if more  then 236  colors are  used, some  colors will be
  123. lost. Windows  reserves the color in the order they appear in the
  124. palette, so the twenty entries at the end of the palette are gen-
  125. erally the ones that are lost.
  126. To overcome these effects you should use color judiciously. If at
  127. all possible,  don't use  more than  236 colors  in any frame and
  128. make these  the first  236 colors in the palette. This limitation
  129. allows all  of the  palette entries  to be reserved. Use a common
  130. palette for  as many  frames as possible. If animations are to be
  131. sequenced in  a script,  the palette  of the  last frame  and the
  132. palette of  the first  frame of the following animation should be
  133. the same.
  134.  
  135. Playback Speed
  136.  
  137. Frame timing depends on whether the Multimedia extensions are in-
  138. stalled on  a system. If these extensions are not installed, ani-
  139. mations can  only be  played at  integral  divisors  of  eighteen
  140. frames per  second (18,  9, 6,  4.5, etc.). The player will round
  141. the speed  so the  playback time  is as  close as possible to the
  142. time desired  (12 frames  per second rounds to 9, 13 to 18). When
  143. the Multimedia extensions are installed, frame timing can be made
  144. to millisecond accuracy.
  145.  
  146. When playing  animations in a window, the player must convert the
  147. Animator format  to Windows  format and then generate the display
  148. from the  converted image. This costs time. Animations can not be
  149. played in a window as quickly as on the full VGA screen.
  150.  
  151. Playback speed  can be  improved, by  loading the  animation into
  152. memory before  playing it. Of course, some amount of time is used
  153. in loading  the animation, but it is possible to hide this by us-
  154. ing a still frame, or pre-loading the animation when the applica-
  155. tion begins.
  156.  
  157. Sound With Animations
  158.  
  159. The player can play sounds with animations, but the player cannot
  160. guarantee frame synchronization between the sounds and the anima-
  161. tion. The  player will  only begin  sounds at the beginning of an
  162. animation, but  in scripts  sounds can play through more than one
  163. animation. Sounds  can also be set to repeat after they have fin-
  164. ished. Repeating  can be set to a specific number of times or un-
  165. til the  animation ends. The animation can also be repeated until
  166. the sound  is finished if you want to build a trailer. The player
  167. can not  change the  playing position  within sounds,  except  to
  168. reposition the  sound to  the starting  point. If  an application
  169. uses aaSetParm, or aaSetParmIndirect to change the position of an
  170. animation, the sound position is not changed. When using the Test
  171. buttons in the user dialogs, sounds will start from the beginning
  172. of the sound.
  173.  
  174. The player  attempts to  support any sound supported by the Media
  175. Control Interface.  Sounds are  divided into  two classes, sounds
  176. which play from files on the computer, and sounds which play from
  177. independent media.  The waveaudio  and sequencer sounds are exam-
  178. ples of  sounds that play from files, and cdaudio, videodisc, au-
  179. diotape, and  videotape are  examples of sounds that play through
  180. independent media.
  181.  
  182. Sounds from  files start  at the  beginning of the sound and con-
  183. tinue until the end of the sound. The player assumes a sound file
  184. contains exactly  one sound  that is played. Sounds for these de-
  185. vices are specified by giving the file name of the sound. The de-
  186. vice name  can also  be given, or if it is not given, the MCI ex-
  187. tensions section of system.ini is used to match the sound file to
  188. the proper device.
  189.  
  190. For sounds  from independent  media this  is not true. Additional
  191. parameters may  be needed  to indicate where the sound begins and
  192. ends on  the media. Since these device do not require file names,
  193. the player  will accept  a string specifying the play command pa-
  194. rameters. These  parameters are  used  each  time  the  sound  is
  195. played. The parameters allowed for specific devices are:
  196.  
  197. cdaudio      from pos
  198.              to pos
  199.  
  200.                 Pos gives  the position  on the  compact disk  in
  201.                 frames.   If from  is not  given, the  sound will
  202.                 start from its current position.
  203.  
  204.  
  205.                 Positions are  given  in  minutes,  seconds,  and
  206.                 frames in  the format t:m:s:f. The first frame is
  207.                 frame 1.  So the first frame of a track is 0:0:1.
  208.                 So in  order to  play a song 4 minutes 63 seconds
  209.                 long on  track 5  of a CDROM, the parameters used
  210.                 would be:
  211.  
  212.                    from 5 to 5:4:63
  213.  
  214.  
  215. videodisc    from pos
  216.              to pos
  217.  
  218.                 Pos  gives  the  position  on  the  videodisc  in
  219.                 frames. Always  give the  to argument  to  insure
  220.                 that the  end of  the sound  is known. If from is
  221.                 not given,  the sound  starts  from  the  current
  222.                 position.
  223.  
  224.                 In this  case, position  is a  time  in  hh:mm:ss
  225.                 format.  Your   videodisc  player   may   display
  226.                 position  in  this  format,  or  it  may  display
  227.                 position as a frame number. To convert from frame
  228.                 numbers to time, divide by 30 to get seconds, and
  229.                 then  convert   to  hh:mm:ss   format.  The  from
  230.                 position must  be at least 1 second. For example,
  231.                 enter
  232.  
  233.                    from 0:0:1 to 0:4:0
  234.  
  235.                 to play 4 minutes on the disc.
  236. User Dialogs
  237. The library  has several  dialogs that  it will  display when re-
  238. quested by an application. The library will also display some er-
  239. ror messages in message boxes.
  240.  
  241. Prompts for File Names
  242.  
  243. Dialogs are  provided to ask the user for the names of animations
  244. or sounds. These dialogs are produced when the function aaGetFile
  245. is called  and when  a user saves a modified script that is begin
  246. unloaded using  aaUnload. The  limited version of the player will
  247. not present  the dialog  for sound  names. If  this dialog is re-
  248. quested, the  player will indicate that CANCEL was pressed in the
  249. dialog.
  250.  
  251. Both of these dialogs are like standard file open dialogs of most
  252. applications. An  edit control  is provided  for entering  a file
  253. name, and  two list boxes list files matching the file specifica-
  254. tion, and  directories. An  additional list box is added when the
  255. name of  a sound file is entered. This box contains a list of de-
  256. vices from the [MCI] section of system.ini, and is used to supply
  257. the device used to play the sound.
  258.  
  259. When selecting  a sound,  the dialog  recognizes device which re-
  260. quire a file name and devices that do not. If the device does not
  261. require a  file name,  the list  boxes for the directory are dis-
  262. abled. The  user can  type in  the play  parameters string in the
  263. edit control.
  264.  
  265. Edit Script Dialog
  266.  
  267. This dialog  is produced when aaPrompt is called for an animation
  268. script. It  combines a  file open dialog with a list box for dis-
  269. playing and  editing the script itself. This dialog cannot appear
  270. in the limited version of the player, since animation scripts are
  271. not supported.
  272.  
  273. The file  open controls  and list  boxes are on the right side of
  274. the dialog.  These are  used to select animations or sounds to be
  275. entered in  the script.  To add  an animation  or  sound  to  the
  276. script, the  file is  selected and  then you can press the Insert
  277. button or  double click  on the  file name  in the file list box.
  278. This will insert the animation before the currently selected ani-
  279. mation in  the script, or add the sound to the currently selected
  280. animation. You  can also  double click  on an  animation  in  the
  281. script list  box which  will insert  the new animation before the
  282. selected animation.
  283.  
  284. The list  box on  the left contains the lines of the script. Each
  285. line is identified by the name of the animation, followed by sev-
  286. eral characters indicating which animation parameters are changed
  287. from the default. These characters are:
  288.  
  289.              L  -  The number of loops is not 1.
  290.              S  -  The speed is not the design speed.
  291.              N  -  Sound has been added.
  292.              R  -  The sound  is to  be repeated,  if it finishes                   before the animation does.
  293.              D  -  The sound does not start with the animation.
  294.              C  -  Palette animation is inhibited.
  295.              A  -  The entire palette is reserved for animation.
  296.              M  -  The animation  is loaded  into  memory  before
  297.                    playing.
  298.              F  -  The animation is to play in full screen mode.
  299.              E  -  The last  frame of the animation does not loop
  300.                    to the first frame.
  301.              P  -  The animation is paused at its end.
  302.              I  -  A transition has been added to the animation.
  303.  
  304. Using the buttons at the bottom left you can Cut, Copy, and Paste
  305. lines in  the script.  Paste will  paste text  lines  from  other
  306. sources, if  they are  in the  format of a script file. The Clear
  307. button deletes  lines from the script without copying them to the
  308. Clipboard. The  Undo button  undoes the  last change  made to the
  309. script.
  310.  
  311. The buttons  at the lower right are used to exit the dialog, test
  312. the animation,  save the script, change an animations parameters,
  313. and change  the sound  for an animation. Pressing the Done button
  314. will exit the dialog and leave the script as it was last changed.
  315. Pressing the  Test button  will test the animation script, begin-
  316. ning with  the selected  entry. If no entry is selected, the test
  317. will start at the beginning of the script. Pressing the Save but-
  318. ton will  save the  script as  it is currently. When a single an-
  319. imation is  selected in  the script  list box, the Parameters and
  320. Sound buttons  are enabled.  Pressing the parameters buttons will
  321. bring up  the Animation  Parameters Dialog,  described below, and
  322. allow parameters  for the  animation to be changed in the script.
  323. Pressing the Sound button will change the mode of the dialog from
  324. adding animations  to changing  the sound for the selected anima-
  325. tion.
  326.  
  327. When the  sound button  is pressed,  the script  list box is dis-
  328. abled, the edit buttons at the bottom left of the screen are dis-
  329. abled, and the parameters button is enabled. If the animation al-
  330. ready has  a sound,  the name  of sound  is displayed in the edit
  331. control, and  the directory  is displayed  in the  list boxes. At
  332. this point the user can either press the Flicks button which will
  333. return the  dialog to  the animation mode, or selects a sound and
  334. press the  Insert button,  which will add the sound to the anima-
  335. tion, or  press the Off button at the bottom of the dialog, which
  336. will remove  any sound  from the animation, or press the Continue
  337. button at  the dialog which will continue the sound from the pre-
  338. vious animation to this animation. When any of these actions take
  339. place, the dialog is returned to the animation mode.
  340.  
  341. Animation Settings
  342.  
  343. This dialog is produced when aaPrompt is called for a normal ani-
  344. mation, or the Parameters button is pressed for an animation in a
  345. script. It  is used to adjust parameters of the animation such as
  346. speed and length of play.
  347.  
  348. At the top right of the dialog, the speed, and length of one loop
  349. of the  animation is displayed. Frames gives the length in frames
  350. of a  single loop,  Design Speed gives the speed of the animation
  351. as set  in Animator,  and Duration gives the duration of a single
  352. loop of the animation at the design speed in seconds.
  353.  
  354. Also at the top of the dialog are five check boxes to control the
  355. mode of the animation:
  356.  
  357.              Load into Memory
  358.                 When set  all of the animations frames are loaded
  359.                 from disk  into  memory  when  the  animation  is
  360.                 loaded. This  can be  used  to  improve  playback
  361.                 speed of  animation that have large average frame
  362.                 sizes.
  363.  
  364.              Full Screen
  365.                 This check  box is only enabled if the FullScreen
  366.                 entry is  present in  the [AAPLAY Animation] sec-
  367.                 tion of  win.ini. If it is checked, the animation
  368.                 will use  the full  screen to  play,  instead  of
  369.                 playing in a window.
  370.  
  371.              Loop Frame
  372.                 This check box is only enabled for Windows Device
  373.                 Independent Bitmap  Animations. It is used to in-
  374.                 dicate that  the last  frame of  the animation is
  375.                 the deltas  from the  end of the animation to the
  376.                 beginning of the animation.
  377.  
  378.              Color Cycling OK
  379.                 This check  box is used to inhibit palette anima-
  380.                 tions. It  is usually  checked which  causes  the
  381.                 player to  reserve palette  entries  that  change
  382.                 during an  animation. If  it is  not checked, the
  383.                 player will not reserve any palette entries.
  384.  
  385.              Use All Colors
  386.                 This check  box is only enabled if Animate Colors
  387.                 is checked.  Checking this  box  will  cause  the
  388.                 player to reserve all palette entries for palette
  389.                 animation.
  390.  
  391. The three edit controls and scroll bars in the middle of the dia-
  392. log labeled,  Speed, Loops,  and Duration are used to control the
  393. speed and length of an animation.
  394.  
  395. Speed is  given in  frames per second, and defaults to the design
  396. speed.   It can  be changed using the scroll bar to its right, or
  397. by typing  the desired speed in the field where the current value
  398. is displayed. It can range from 1.0 to 51.0 frames per second.
  399.  
  400. Loops tells the player when to stop the animation. Its format is:
  401.  
  402.              loop:frame
  403.  
  404. Loop gives  the number of times to completely play the animation,
  405. and frame  is the  number of frames played after all of the loops
  406. are played.  If frame  is zero,  it is not displayed and does not
  407. need to  be entered.  Loops can be changed using it's scroll bar,
  408. or by  typing in  the desired value. Loops can range from 1 frame
  409. to 999 Loops. It may also take on the value "Forever" which indi-
  410. cates that  the animation  can only  by stopped  by  an  external
  411. event. The  number of  whole loops  can also  be given  the value
  412. "Sound" which  indicates that  the animation is to loop until the
  413. sound is  finished playing. If no frame number is given, the ani-
  414. mation will  end when  the sound ends. If a frame number is given
  415. the animation will end immediately before the frame is played and
  416. after the sound has ended.
  417.  
  418. Duration is  the length  of time  the animation  will play. It is
  419. calculated from the Speed and Loops values. Its format is:
  420.  
  421.              mm:ss.msec
  422.  
  423. Mm is  the number  of minutes,  ss the number of seconds and msec
  424. the number of milliseconds. It may range from the time of 1 frame
  425. to 49:59.999.
  426.  
  427. It is  when changing  any of these three parameters, at least one
  428. of the other parameters must be changed to make the speed, length
  429. in loops and frame and duration in time consistent. The lock but-
  430. ton controls  the parameter that is fixed in the calculation. The
  431. parameter that  is not  fixed is  adjusted each  time one  of the
  432. other ones is changed.
  433.  
  434. The Repeat  Sound entry  is used  to change the number of times a
  435. sound is  repeated. It can vary from 1 to 1000 times. It can also
  436. take on  the value  of "Forever"  which indicates  that the sound
  437. will repeat  until the  animation is stopped. This entry does not
  438. appear in the limited version of the player.
  439.  
  440. The Delay  Sound entry  is used to delay sounds from the start of
  441. the animation.  The number is given as a time in milliseconds and
  442. can range from -50:00.000 to 50:00.000. If the number is positive
  443. the sound  start that  length of time after the animation starts.
  444. If the  number is  negative the  sound starts that length of time
  445. before the  animation starts.  The timing is directly tied to the
  446. speed of  the animation, so the sound will be delayed longer than
  447. the time  given if  the animation  cannot play  at the  requested
  448. speed. This  entry does  not appear in the limited version of the
  449. player.
  450.  
  451. The Pause  at End entry is used to length of time an animation is
  452. paused when it ends. It can vary from 0.000 to 50.000 seconds. If
  453. the animation loops is set to "Sound" with no frame given the an-
  454. imation is  not paused  if it  is playing when the sound ends. If
  455. the animation  has ended as is paused, in this case the ending of
  456. the sound will cause the animation end.
  457.  
  458. The Test  button will  destroy the  dialog, and run the animation
  459. with the currently selected values. Any key press, or mouse click
  460. in the animation window will stop the test and return to the dia-
  461. log.
  462. OK accepts the current values and CANCEL rejects the current val-
  463. ues.
  464.  
  465. The Transitions  button displays  the Transition dialog described
  466. below.
  467.  
  468. Transition Dialog
  469.  
  470. The transition dialog is presented when the Transitions button is
  471. pressed in the Animation Settings dialog. This dialog is used to
  472. add fades to the beginning and end of animations. The duration of
  473. the fades can be set between .25 and 10.0 seconds.
  474.  
  475. Function Summary
  476. The functions provided for frame animation are:
  477.  
  478.              aaOpen            Opens the library.
  479.  
  480.              aaGetCaps         Returns  current  capabilities  of
  481.                                the animation player.
  482.  
  483.              aaClose           Closes the library.
  484.  
  485.              aaLoad            Loads a new animation.
  486.  
  487.              aaUnload          Unloads a loaded animation.
  488.  
  489.              aaReLoad          Loads an  animation over  a loaded
  490.                                animation.
  491.  
  492.              aaPlay            Starts playing a loaded animation.
  493.  
  494.              aaPause           Pauses a playing animation.
  495.  
  496.              aaStop            Stops a playing animation.
  497.  
  498.              aaNotify          Schedules  frame   synchronization
  499.                                messages.
  500.  
  501.              aaCancel          Cancels frame synchronization mes-
  502.                                sages.
  503.  
  504.              aaPrompt          Prompts for  animation  parameters
  505.                                using dialogs.
  506.  
  507.              aaGetParm         Retrieves animation parameters.
  508.  
  509.              aaGetParmIndirect Retrieves animation parameters.
  510.  
  511.              aaSetParm         Changes animation parameters.
  512.  
  513.              aaSetParmIndirect Changes animation parameters.
  514.  
  515.              aaShow            Displays or  hides  the  animation
  516.                                window.
  517.  
  518.              aaSound           Places sound with an animation.
  519.  
  520.              aaGetFile         Prompts for  a file  name using  a
  521.                                dialog.
  522.  
  523.              aaSave            Saves a  loaded animation  script.
  524. Using the Windows Animation Player
  525.  
  526. There are  three basic  phases to  using the  player. During  the
  527. first phase,  an application must connect to the player. Once the
  528. connection is  established, animations  can be loaded and played.
  529. Finally the  application must  disconnect from  the player before
  530. exiting.
  531.  
  532. In order  to connect to the player, the application must call the
  533. function aaOpen.  This function  has no  arguments and  returns a
  534. zero if  the connection fails, or a non-zero value if the connec-
  535. tion succeeds.  If the connection fails, no other call to the li-
  536. brary should be made. aaOpen should not be called again until af-
  537. ter a call to aaClose is made. The function aaGetCaps can be used
  538. to determine what player capabilities are available. Depending on
  539. the system  and version, sound or scripting may not be available,
  540. and only reduced frame timing may be available.
  541.  
  542. To disconnect  from the  player, the  function aaClose is called.
  543. This function  has no  arguments or  return  value.  The  library
  544. should not be used after aaClose is called.
  545.  
  546. In order  to play  animations they  must first  be  loaded  using
  547. aaLoad. aaLoad  returns an unsigned integer which is used to ref-
  548. erence a loaded animation in other library functions. These func-
  549. tions can  be used to begin play, stop or pause play, and reposi-
  550. tion the  animation. When an application is finished with an ani-
  551. mation, it can be unloaded using aaUnload.
  552.  
  553. After the  library has been opened, an application can use aaGet-
  554. File to prompt for an animation or sound file name. Of course, an
  555. application can  also use its own file name dialog, or some other
  556. mechanism to obtain the names of animations.
  557.  
  558. Two primitives  are supplied  for  frame  synchronization.  These
  559. primitives allow  an application  to request  call backs from the
  560. animation player when certain frames are to be drawn. Using these
  561. call backs,  the application can synchronize any other event with
  562. an animation frame. The primitives are aaNotify which schedules a
  563. call back,  and aaCancel which cancels a call back. When a script
  564. is playing,  call backs  can only  be scheduled for the currently
  565. playing animation.  In order  to  facilitate  synchronization  in
  566. scripts, a  call back  is made  at the start of each animation in
  567. the script.
  568.  
  569. Call backs are provided for frame synchronization and state and
  570. error notification. The call back is made to the Window Procedure
  571. of the window set as the call back window. When an animation is
  572. loaded, the call back window is set to the hwnd parameter, but it
  573. may be changed by aaSetParm or aaSetParmIndirect. Two messages
  574. are used and the message number of these messages is determined
  575. using RegisterWindowMessage. The messages are identified by the
  576. following strings:
  577.  
  578.              "AAPLAY Notify"   -  Message string  for frame  syn-
  579.                                   chronization messages.
  580.              "AAPLAY Stop"     -  Message string  for status  and
  581.                                   error messages.
  582. The call back function should be declared as follows:
  583.  
  584.              LONG FAR PASCAL CallBack(hwnd, msg, wparam, lparam);
  585.              HWND hwnd;
  586.              WORD msg;
  587.              WORD wparam;
  588.              DWORD lparam;
  589.  
  590. The hwnd  parameter always  identifies the owner of the animation
  591. window. The msg parameter identifies the message, and is found by
  592. calling  RegisterWindowMessage   with  the   appropriate  message
  593. string. The wparam parameter always identifies the animation that
  594. generated the message. It gives the value returned by aaLoad when
  595. the animation was loaded.
  596.  
  597. For frame synchronization messages, lparam is the value requested
  598. by the  application when the call back was requested, or zero for
  599. frame synchronization call backs generated at the beginning of an
  600. animation in a script.
  601.  
  602. For status  and error messages, lparam is an error code. If it is
  603. zero, the animation stopped at the end without an error. The fol-
  604. lowing error codes are defined:
  605.  
  606.              AA_BADPLAY        -  1
  607.                 An error occurred reading the animation.
  608.  
  609.              AA_BADNOTIFY      -  2
  610.                 A memory  error occurred  attempting a frame syn-
  611.                 chronization message.
  612.  
  613.              AA_BADSCRIPT      -  3
  614.                 An error  occurred loading  an animation or sound
  615.                 for a script.
  616.  
  617. When processing  a callback  message from  the player, you should
  618. not use aaUnload to unload the animation, or aaClose to close the
  619. library. You may used aaReLoad to reload an animation when a stop
  620. callback is recieved, but not when a frame callback is recieved.
  621.  
  622. Several function are provided for retrieving and changing parame-
  623. ters of  an animation.  The application can provide a user inter-
  624. face or  use the one provided in aaPrompt. For normal animations,
  625. the application  should retrieve  the values of an animations pa-
  626. rameters and  save them  for later  use. Scripted animations will
  627. save the animation parameters in the script.
  628. Animation Scripts
  629.  
  630. Animation scripts are text files containing an order list of ani-
  631. mations. Animation  scripts can not be played by the limited ver-
  632. sion of  the player.  An error  is returned if the limited player
  633. attempts to  open an  animation script. The animations are played
  634. in the  order given  in the  list. Each  animation is listed on a
  635. separate line.  Any line listing an animation to be played can be
  636. continued by putting a back slash "\" at the end of the line. The
  637. last continuation line must not have a "\" at its end. any number
  638. of spaces,  tabs, or  the end  of continued  lines are treated as
  639. though it was just one space.
  640.  
  641. Each line  in the script starts with the name of the animation to
  642. be played, followed by optional entries giving parameters used in
  643. playing the animation. Each option begins with a minus sign, "-".
  644. If an  option uses  a parameter,  you may put a space between the
  645. option and  the parameter,  or not.  However a space must precede
  646. the minus sign for each option.
  647.  
  648. For more  information on  each option,  see  the  information  in
  649. aaLoad, aaGetParm,  and aaSound.  The following  options are sup-
  650. ported:
  651.  
  652.              -L loops[:frame]
  653.                 Sets the  length of the animation. If set to 0 or
  654.                 "Forever", the  animation will  loop forever. De-
  655.                 faults to  1:0. The  loops may also be set to the
  656.                 value "Sound", which indicates that the animation
  657.                 is to loop until the sound is finished playing.
  658.  
  659.              -S speed
  660.                 Sets the  speed of  the animation  in frames  per
  661.                 second. This value can be specified to a tenth of
  662.                 a frame  per second. Defaults to the design speed
  663.                 of the animation.
  664.  
  665.              -N [sound [device]]
  666.                 Puts a  sound with the animation. If the sound is
  667.                 missing, the  sound, if any, of the previous ani-
  668.                 mation is used with this animation. If the device
  669.                 is missing,  the [MCI Extensions] section of sys-
  670.                 tem.ini is  used to locate the device used by the
  671.                 sound. An  animation that  does not have this op-
  672.                 tion will turn any sound off before playing.
  673.  
  674.              -R sound-repeats
  675.                 Sets the number of times a sound is to repeat. If
  676.                 set to 0 or "Forever", the sound will continue to
  677.                 play until  the animation is finished, or another
  678.                 sound is played. Defaults to 1. The value is only
  679.                 checked, when the sound reaches the end of play.
  680.  
  681.              -D sound-delay
  682.                 Sets a  delay from  the start of the animation to
  683.                 the start of the sound. The time is given in min-
  684.                 utes and  seconds, and  can be given to one thou-
  685.                 sandth of  a second.  The  time  can  range  from
  686.                 50:00.000 to -50:00.000.
  687.  
  688.              -P pause-time
  689.                 Sets a  time which  the script  will pause  after
  690.                 this animation  has finished  before starting the
  691.                 next animation. The time is given in seconds, and
  692.                 can be given to one thousandth of a second.
  693.  
  694.              -I [transition [duration]]...
  695.                 Sets transitions  for animations  in scripts. The
  696.                 transition  may  be  on  of  cutfrom,  fromblack,
  697.                 fromwhite,   cutto,    toblack,    or    towhite.
  698.                 Transitions default  to  cutto  or  cutfrom.  The
  699.                 duration of  the transition  can  be  given  from
  700.                 between .250  seconds  and  10.000  seconds.  The
  701.                 default time  is  .500  seconds.  More  than  one
  702.                 transition may follow the -I.
  703.  
  704.              -C
  705.                 Inhibits palette animation.
  706.  
  707.              -A
  708.                 Reserves all  palette entries  for palette anima-
  709.                 tion.
  710.  
  711.              -M
  712.                 Loads the animation into memory.
  713.  
  714.              -F
  715.                 Plays the animation in full screen mode.
  716.  
  717.              -E
  718.                 Indicates that the last frame of the animation is
  719.                 not the  deltas between  the end of the animation
  720.                 and the beginning. Only valid for Windows DIB an-
  721.                 imations.
  722. The Dynamic Link Library Entry Points
  723. _________________________________________________________________
  724.  
  725. aaOpen
  726.  
  727. Syntax       BOOL aaOpen(void)
  728.              
  729.              aaOpen initializes  the player  for the application.
  730.              TRUE is  returned if  the initialization  succeeded.
  731.              Otherwise FALSE is returned.
  732.  
  733.              An application  must call  aaOpen before  making any
  734.              other calls  to the  AA Play  Library. aaOpen should
  735.              not be called again before aaClose is called.
  736.  
  737. Parameters   None
  738.  
  739. _________________________________________________________________
  740.  
  741. aaClose
  742.  
  743. Syntax       void aaClose(void)
  744.              
  745.              aaClose releases  the player  from the  application.
  746.              Any loaded  animations used  by the  application are
  747.              unloaded.
  748.  
  749.              Other calls  to the  AA Play  Library should  not be
  750.              performed after  this call is made. aaOpen should be
  751.              called again to reopen the library, if necessary.
  752.  
  753. Parameters   None
  754.  
  755. _________________________________________________________________
  756.  
  757. aaLoad
  758.  
  759. Syntax       HAA aaLoad(lpzFileName, hWnd, wMode, x, y, cx, cy,
  760.                 orgx, orgy)
  761.                 
  762.              aaLoad loads  an animation  in preparation for play-
  763.              ing. It  returns a number between 1 and 65535, which
  764.              is used  to reference  the loaded animation in other
  765.              library calls.  Once an  animation is loaded, it can
  766.              be played,  and various  parameters controlling  its
  767.              playing can be altered.
  768.  
  769.              If aaLoad  is unable  to load  the  animation,  NULL
  770.              (zero) is returned.
  771.  
  772. Parameters   LPSTR lpzFileName
  773.                 
  774.                 The name  of the  animation file  to be opened or
  775.                 the contents  of an animation script depending on
  776.                 the value of wMode. OpenFile is used to open ani-
  777.                 mation files  and  so  the  normal  Windows  file
  778.                 searching algorithm  is used.  This search  algo-
  779.                 rithm will  first search  the current  directory,                then each directory in the PATH environment vari-
  780.                 able.
  781.  
  782.                 If the  wMode value indicates that lpzFileName is
  783.                 the contents of a script, the animation is opened
  784.                 as an untitled script.
  785.  
  786.              HWND hWnd
  787.                 
  788.                 The handle of a window that is to own this anima-
  789.                 tion. It  must  be  supplied  but  may  be  null.
  790.                 Coordinates are given relative to this window and
  791.                 it is  used to  receive status and frame synchro-
  792.                 nization messages, when these are sent.  The mes-
  793.                 sage numbers used for the status and notification
  794.                 messages are  retrieved using  RegisterWindowMes-
  795.                 sage. The  following two  messages  are  used  by
  796.                 AAPLAY:
  797.  
  798.                    AA_STOP              -  "AAPLAY Stop"
  799.                       
  800.                       The animation  is being  stopped. If lParam
  801.                       is non zero, the animation is being stopped
  802.                       because of  an error.  This message  is not
  803.                       sent when  the application stops the anima-
  804.                       tion using aaStop.
  805.  
  806.                    AA_NOTIFY            -  "AAPLAY Notify"
  807.                       
  808.                       Sent because  the user  requested notifica-
  809.                       tion when  a frame  is drawn.  See aaNotify
  810.                       and aaCancel.
  811.  
  812.              WORD wMode
  813.                 
  814.                 A word  which indicates  how the  file is  to  be
  815.                 loaded. This  value is found by adding the values
  816.                 desired below:
  817.  
  818.                    AA_MEMORYLOAD        -  1
  819.                       
  820.                       Loads the  entire  animation  into  memory.
  821.                       This requires  more time,  and may fail be-
  822.                       cause of insufficient memory.
  823.  
  824.                    AA_HIDEWINDOW        -  2
  825.                       
  826.                       Normally the  frame at  which the animation
  827.                       is stopped  is displayed  on the screen. If
  828.                       this value is added into the mode, the ani-
  829.                       mation is  only displayed  when it is play-
  830.                       ing.
  831.  
  832.                    AA_NOPALETTE         -  4
  833.                       
  834.                       Inhibits palette  animation.  When  palette                      animation is  enabled, some  colors may  be
  835.                       lost if more that 236 colors are used.
  836.  
  837.                    AA_RESERVEPALETTE    -  8
  838.                       
  839.                       If palette animation is not inhibited, this
  840.                       flag will  reserve all  of the  palette en-
  841.                       tries for  animation. Some  colors  may  be
  842.                       lost if  more that  236 colors are used. If
  843.                       the palette  is changed  without this  flag
  844.                       being set,  Windows will  send a message to
  845.                       all windows on the screen informing them of
  846.                       the palette change. This can cause the ani-
  847.                       mation to stop momentarily.
  848.  
  849.                       In order to prevent the palette change mes-
  850.                       sages when  changing animations in scripts,
  851.                       or using aaReLoad, this flag must be set in
  852.                       the current animation and the following an-
  853.                       imation.
  854.  
  855.                    AA_LOOPFRAME         -  16
  856.                       
  857.                       Indicates that  the last frame of a Windows
  858.                       device independent  bitmap animation is ac-
  859.                       tually the deltas between the last frame of
  860.                       the animation  and the first. This value is
  861.                       not used for Autodesk Animator Animations.
  862.  
  863.                    AA_FULLSCREEN        -  32
  864.                       
  865.                       Indicates  that  the  animation  is  to  be
  866.                       played on  the full  screen, not within the
  867.                       window hWnd.
  868.  
  869.                    AA_STOPNOTIFY        -  64
  870.                       
  871.                       Prevents notification  messages from  being
  872.                       sent to the window identified by hWnd.
  873.  
  874.                    AA_STOPSTATUS        -  128
  875.                       
  876.                       Prevents status messages from begin sent to
  877.                       the window identified by hWnd.
  878.  
  879.                    AA_NOFAIL            -  256
  880.                       
  881.                       If  a  memory  load  fails  due  to  memory
  882.                       limitations, the  animation  is  loaded  to
  883.                       play from disk.
  884.  
  885.                    AA_BUILDSCRIPT       -  1024                      
  886.                       Indicates that  an untitled script is to be
  887.                       built using  the contents of the string ad-
  888.                       dressed by  lpzFileName. If  this  mode  is
  889.                       used for the limited version of the player,
  890.                       FALSE is returned.
  891.  
  892.                 WORD x, y, cx, cy
  893.                       
  894.                       The coordinate  of the upper left corner of
  895.                       the window  used to  display the animation,
  896.                       and the  width (cx) and height (cy) of that
  897.                       window. X  and y  are relative to the upper
  898.                       left corner of the client are of the window
  899.                       hWnd. These  values are  modified to  force
  900.                       the window  to be  contained in  the window
  901.                       identified by hWnd.
  902.  
  903.                 WORD orgx, orgy
  904.                       
  905.                       The coordinate  of the  animation displayed
  906.                       at the upper left corner of the window used
  907.                       to display the animation.
  908.  
  909. _________________________________________________________________
  910.  
  911. aaUnload
  912.  
  913. Syntax       BOOL aaUnload(hAa)
  914.              
  915.              Unloads an animation loaded by aaLoad. If the anima-
  916.              tion is  playing, it  is stopped.  aaUnload will ask
  917.              the user  to save a modified script. This can be in-
  918.              hibited by  clearing the  modified flag using aaSet-
  919.              Parm.
  920.  
  921. Parameters   HAA hAa
  922.                 
  923.                 A handle returned by aaLoad.
  924.  
  925. _________________________________________________________________
  926.  
  927. aaReLoad
  928.  
  929. Syntax       BOOL aaReLoad(hAa, lpzFileName, wMode, wMask)
  930.              
  931.              Loads another animation over an existing one. If the
  932.              two animations  use different  colors, then  setting
  933.              AA_RESERVEPALETTE in both the existing animation and
  934.              in wMode  can improve  the performance of this func-
  935.              tion.  The   existing  animation  must  be  stopped,
  936.              paused, or  have finished  playing in  order to make
  937.              this call.
  938.  
  939. Parameters   HAA hAa
  940.                 
  941.                 The handle of the animation returned by aaLoad.
  942.              LPSTR lpzFileName
  943.                 
  944.                 The name  of the  animation file  to be opened or
  945.                 the contents  of an animation script depending on
  946.                 the value of wMode. OpenFile is used to open ani-
  947.                 mation files  and  so  the  normal  Windows  file
  948.                 searching algorithm  is used.  This search  algo-
  949.                 rithm will  first search  the current  directory,
  950.                 then each directory in the PATH environment vari-
  951.                 able.
  952.  
  953.                 If the  wMode value indicates that lpzFileName is
  954.                 the contents of a script, the animation is opened
  955.                 as an untitled script.
  956.  
  957.              WORD wMode
  958.                 
  959.                 This value is used exactly the same as in aaLoad.
  960.                 It uses  the same  value with the following addi-
  961.                 tional value:
  962.  
  963.                    AA_DONTPAINT         -  512
  964.                       
  965.                       Inhibits painting  of the initial frame un-
  966.                       til the animation begins playing.
  967.  
  968.              WORD wMask
  969.                 
  970.                 A mask used for setting the mode. Setting of spe-
  971.                 cific mode  values can be inhibited by adding the
  972.                 value not to be set into this argument.
  973.  
  974. _________________________________________________________________
  975.  
  976. aaPlay
  977.  
  978. Syntax       BOOL aaPlay(hAa)
  979.              
  980.              Plays the  animation loaded  by aaLoad.  Play begins
  981.              from the  current position. aaPlay returns after the
  982.              animation has begun playing. Returns TRUE if the an-
  983.              imation is playing.
  984.  
  985. Parameters   HAA hAa
  986.                 
  987.              A handle returned by aaLoad.
  988.  
  989. _________________________________________________________________
  990.  
  991. aaNotify
  992.  
  993. Syntax       BOOL aaNotify(hAa, lPosition, lParam)             
  994.              Requests a frame synchronization message for the ap-
  995.              plication using  aaPlay. The message is sent immedi-
  996.              ately before  the frame  at  position  lPosition  is
  997.              drawn. lParam  is a  parameter set by the user which
  998.              is passed to the message handler. The word parameter
  999.              to the  message routine is always the handle hAa. If
  1000.              the position  at the  time of the call is needed, it
  1001.              can be  retrieved using aaGetParm. This call is used
  1002.              to synchronize other events to an animation frame.
  1003.  
  1004.              The player  will automatically  generate frame  syn-
  1005.              chronization messages  whose lParam is zero, when an
  1006.              animation begins  playing. If  the  application  re-
  1007.              quests frame synchronization with lParam zero, it is
  1008.              the responsibility  of the  application to determine
  1009.              which synchronization message is begin sent.
  1010.  
  1011. Parameters   HAA hAa
  1012.                 
  1013.                 A handle returned by aaLoad.
  1014.  
  1015.              DWORD lPosition
  1016.                 
  1017.                 The position at which the notification is to take
  1018.                 place. The  high order  word is  the loop and the
  1019.                 low order word is the frame.
  1020.  
  1021.              DWORD lParam
  1022.                 
  1023.                 A double  word passed  to the  notification func-
  1024.                 tion.
  1025.  
  1026. _________________________________________________________________
  1027.  
  1028. aaCancel
  1029.  
  1030. Syntax       WORD aaCancel(hAa, lLowPos, lHighPos)
  1031.              
  1032.              Cancels frame  synchronization messages.  The number
  1033.              of messages canceled is returned.
  1034.  
  1035. Parameters   HAA hAa
  1036.                 
  1037.                 A handle returned by aaLoad
  1038.  
  1039.              DWORD lLowPos
  1040.                 
  1041.                 The lower loop and frame count where notification
  1042.                 messages are canceled.
  1043.  
  1044.              DWORD lHighPos
  1045.                 
  1046.                 The upper loop and frame count where notification
  1047.                 messages are canceled.
  1048.  
  1049. _________________________________________________________________
  1050. aaStop
  1051.  
  1052. Syntax       BOOL aaStop(hAa)
  1053.              
  1054.              Stops the playing animation. Returns TRUE if the an-
  1055.              imation is  stopped. Stopped  animations begin  with
  1056.              the first  frame of the animation, when they are re-
  1057.              played. You  may  also  use  aaSetParm  to  start  a
  1058.              stopped animation  at a  frame other  than the first
  1059.              frame.
  1060.  
  1061. Parameters   HAA hAa
  1062.                 
  1063.                 A handle returned by aaLoad
  1064.  
  1065. _________________________________________________________________
  1066.  
  1067. aaPause
  1068.  
  1069. Syntax       BOOL aaPause(hAa)
  1070.              
  1071.              Pauses a playing animation. Returns TRUE if the ani-
  1072.              mation is  paused. A  paused animation is still con-
  1073.              sidered playing,  so no other full screen animations
  1074.              will play.  Paused animations  will continue playing
  1075.              from the  current frame,  when they  are replayed by
  1076.              calling aaPlay.
  1077.  
  1078. Parameters   HAA hAa
  1079.                 
  1080.                 A handle returned by aaLoad.
  1081.  
  1082. _________________________________________________________________
  1083.  
  1084. aaPrompt
  1085.  
  1086. Syntax       BOOL aaPrompt(hAa, lpName)
  1087.              
  1088.              Produces a  dialog box that prompts the user for pa-
  1089.              rameters for  playing the  animation whose handle is
  1090.              hAa.
  1091.  
  1092.              This call  acts differently  for scripts  and normal
  1093.              animations. For  normal animations,  the values  en-
  1094.              tered by  the user  can be retrieved using aaGetParm
  1095.              or aaGetParmIndirect. Scripts can be saved in a file
  1096.              using aaSave,  or the  contents of the script can be
  1097.              retrieved using aaGetParm. Scripts are not available
  1098.              in the limited version of the player.
  1099.  
  1100.              If a  script is modified, aaUnload will ask the user
  1101.              to save  the script when it is unloaded. This can be
  1102.              prevented by  setting the modified flag to zero, us-
  1103.              ing aaSetParm.
  1104.  
  1105. Parameters   HAA hAa                
  1106.                 A handle returned by aaLoad.
  1107.  
  1108.              LPSTR lpName
  1109.                 
  1110.                 The name of the animation. This name is used only
  1111.                 to provide  a caption  for the  dialog for normal
  1112.                 animations. If it is NULL, no name is provided in
  1113.                 the dialog caption in this case.
  1114.  
  1115. _________________________________________________________________
  1116.  
  1117. aaGetParm
  1118.  
  1119. Syntax       LONG aaGetParm(hAa, wType)
  1120.              
  1121.              Gets current  parameters for  playing the animation.
  1122.              Parameters that  are not valid are returned as zero.
  1123.              If the  animation is  a script,  the parameters  re-
  1124.              turned are for the currently visible animation.
  1125.  
  1126. Parameters   HAA hAa
  1127.                 
  1128.                 A handle returned by aaLoad.
  1129.  
  1130.              WORD wType
  1131.                 
  1132.                 The type of parameter to be retrieved:
  1133.  
  1134.                    AA_STATUS            -  1
  1135.                       
  1136.                       Returns a word containing current status of
  1137.                       the animation.  The status  of an animation
  1138.                       can be:
  1139.  
  1140.                       AA_STOPPED        -  1
  1141.                          
  1142.                          The animation is loaded and is not play-
  1143.                          ing.
  1144.  
  1145.                       AA_QUEUED         -  2
  1146.                          
  1147.                          The animation  is loaded  and aaPlay has
  1148.                          been used  to start  the animation,  but
  1149.                          the animation  cannot be started because
  1150.                          either it is a full screen animation, or
  1151.                          a full  screen animation  is playing, or
  1152.                          both. The  animation will  be  begun  as
  1153.                          soon as possible.
  1154.  
  1155.                       AA_PLAYING        -  3
  1156.                          
  1157.                          The animation is playing.
  1158.  
  1159.                       AA_PAUSED         -  4                         
  1160.                          The animation  has been paused using aa-
  1161.                          Pause.
  1162.  
  1163.                       AA_DONE           -  5
  1164.                          
  1165.                          A transitory  state after  an  animation
  1166.                          has finished  playing, but before it has
  1167.                          been  stopped.   The  animation  may  be
  1168.                          restarted from  this state  using aaPlay
  1169.                          or reloaded using aaReLoad.
  1170.  
  1171.                    AA_FILETYPE          -  2
  1172.                       
  1173.                       Returns a word containing the format of the
  1174.                       animation on disk. The values returned are:
  1175.                       
  1176.                       AA_FLI            -  1
  1177.                          
  1178.                          Animator FLI format.
  1179.  
  1180.                       AA_DIB            -  2
  1181.                          
  1182.                          Windows DIB format.
  1183.  
  1184.                       AA_SCRIPT         -  3
  1185.                          
  1186.                          The animation  is a  script. This  value
  1187.                          will never  be returned  by the  limited
  1188.                          version of the player.
  1189.  
  1190.                    AA_MODE              -  3
  1191.                       
  1192.                       Returns a  word containing the current mode
  1193.                       of the  animation. The  values are the same
  1194.                       as the  mode described  in  aaLoad,  except
  1195.                       AA_NOFAIL and AA_BUILDSCRIPT are never set.
  1196.  
  1197.                    AA_WINDOW            -  4
  1198.                       
  1199.                       Returns a word containing the handle of the
  1200.                       window that owns the animation.
  1201.  
  1202.                    AA_SPEED             -  5
  1203.                       
  1204.                       Returns a  word containing the speed of the
  1205.                       animation, given in milliseconds per frame.
  1206.                       This is the current speed of the animation.
  1207.  
  1208.                    AA_DESIGNSPEED       -  6
  1209.                       
  1210.                       Returns  a  word  containing  the  designed
  1211.                       speed of  the animation, given in millisec-
  1212.                       onds per frame.
  1213.  
  1214.                    AA_FRAMES            -  7                      
  1215.                       Returns a  word containing  the  number  of
  1216.                       frames in  the animation.  If the animation
  1217.                       type is a DIB file, this number will be un-
  1218.                       known, until  the animation  has been  com-
  1219.                       pletely played.  If the number of frames is
  1220.                       unknown, 0 is returned.
  1221.  
  1222.                    AA_POSITION          -  8
  1223.                       
  1224.                       Returns a long containing the current posi-
  1225.                       tion in  the animation. The high order word
  1226.                       is the  current loop, the low order word is
  1227.                       the current  frame. The  first loop is loop
  1228.                       0, and the first frame is frame 0.
  1229.  
  1230.                    AA_LOOPS             -  9
  1231.                       
  1232.                       Returns a  long returning  the position  of
  1233.                       the frame  at which the animation ends. A 0
  1234.                       indicates that  the animation will not stop
  1235.                       until an  aaStop call  is made. This number
  1236.                       has the same format as AA_POSITION.
  1237.  
  1238.                       If the  value of  the high  order  word  of
  1239.                       AA_LOOPS is  AA_LOOPSOUND (which is 65535),
  1240.                       then the  animation loops  until the  sound
  1241.                       finishes playing.  If the low order word is
  1242.                       also this  value, the  animation  will  end
  1243.                       with the  sound. Otherwise,  the  animation
  1244.                       will stop  on the frame number given by the
  1245.                       low order  word, after  the sound  has fin-
  1246.                       ished.
  1247.  
  1248.                    AA_X                 -  10
  1249.                       
  1250.                       Returns the  x coordinate of the upper left
  1251.                       corner of the animation window.
  1252.  
  1253.                    AA_Y                 -  11
  1254.                       
  1255.                       Returns the  y coordinate of the upper left
  1256.                       corner of the animation window.
  1257.  
  1258.                    AA_CX                -  12
  1259.                       
  1260.                       Returns the width of the animation window.
  1261.  
  1262.                    AA_CY                -  13
  1263.                       
  1264.                       Returns the height of the animation window.
  1265.                       
  1266.                    AA_ORGX              -  14
  1267.                       
  1268.                       Returns the  x coordinate in the animation,
  1269.                       displayed at  the upper  left corner of the
  1270.                       animation window.
  1271.                    AA_ORGY              -  15
  1272.                       
  1273.                       Returns the  y coordinate in the animation,
  1274.                       display at the upper left corner of the an-
  1275.                       imation window.
  1276.  
  1277.                    AA_WIDTH             -  16
  1278.                       
  1279.                       Returns the width of the animation.
  1280.  
  1281.                    AA_HEIGHT            -  17
  1282.                       
  1283.                       Returns the height of the animation.
  1284.  
  1285.                    AA_RPTSOUND          -  18
  1286.                       
  1287.                       Returns the  number of times the sound will
  1288.                       repeat before stopping. Zero indicates that
  1289.                       the sound  will repeat  until the animation
  1290.                       ends. Zero  is always  returned in the lim-
  1291.                       ited version of the player.
  1292.  
  1293.                    AA_PAUSE             -  19
  1294.                       
  1295.                       Returns the  length of  time to  pause this
  1296.                       animation at the end in milliseconds.
  1297.  
  1298.                    AA_DELAYSND          -  20
  1299.                       
  1300.                       Returns length  of time  to delay the sound
  1301.                       from the  start of  the animation  in  mil-
  1302.                       liseconds. The  delay is  negative  if  the
  1303.                       sound is  to start  before  the  animation.
  1304.                       Zero is always returned in the limited ver-
  1305.                       sion of the player.
  1306.  
  1307.                    AA_TRANSIN           -  21
  1308.  
  1309.                       Returns the transition at the beginning of
  1310.                       the animation. This transition may be:
  1311.  
  1312.                       AA_CUT            -  0
  1313.                          
  1314.                          No transition is performed.
  1315.  
  1316.                       AA_FADEBLACK      -  1
  1317.                          
  1318.                          Fade from black transition is performed.
  1319.  
  1320.                       AA_FADEWHITE      -  2
  1321.                          
  1322.                          Fade from white transition is performed.
  1323.  
  1324.                    AA_TRANSOUT       -  22
  1325.  
  1326.                       Returns the transition at the end of the
  1327.                       animation. The transition may be:
  1328.                       AA_CUT            -  0
  1329.                          
  1330.                          No transition is performed.
  1331.  
  1332.                       AA_FADEBLACK      -  1
  1333.                          
  1334.                          Fade to black transition is performed.
  1335.  
  1336.                       AA_FADEWHITE      -  2
  1337.                          
  1338.                          Fade to white transition is performed.
  1339.  
  1340.                    AA_TIMEIN            -  23
  1341.  
  1342.                       Returns the duration of the transition at
  1343.                       the beginning of the animation in
  1344.                       milliseconds. This duration may be from
  1345.                       .250 seconds to 10.000 seconds.
  1346.  
  1347.                    AA_TIMEOUT        -24
  1348.  
  1349.                       Returns the duration of the transition at
  1350.                       the end of the animation in milliseconds.
  1351.                       This duration may be from .250 seconds to
  1352.                       10.00 seconds.
  1353.  
  1354.                    AA_MODFLAG           -  100
  1355.                       
  1356.                       Returns the  modified flag  for the script.
  1357.                       Zero means the script is not modified and a
  1358.                       non-zero value  means the  script is  modi-
  1359.                       fied.
  1360.  
  1361.                    AA_CALLBACK       -  25
  1362.                       
  1363.                       Returns the  handle of  the window  used to
  1364.                       receive   the   status   and   notification
  1365.                       messages.
  1366.  
  1367.                    AA_ANIMWND        -  26
  1368.                       
  1369.                       Returns  the  handle  of  the  window  that
  1370.                       actually contains the animation.
  1371.  
  1372.                    AA_SCRIPTNAME        -  101
  1373.                       
  1374.                       Returns a  global memory  handle containing
  1375.                       the name  of the  script. If  the script is
  1376.                       untitled, or the animation is not a script,
  1377.                       zero is returned.
  1378.  
  1379.                    AA_ANIMATION         -  102
  1380.                       
  1381.                       Returns the number of the currently visible
  1382.                       animation in  a script.  Zero is  the first
  1383.                       animation of  a script,  or returned if the
  1384.                       animation is not a script.
  1385.                    AA_ANIMATIONCOUNT    -  103
  1386.                       
  1387.                       Returns  the  number  of  animations  in  a
  1388.                       script. Zero  is returned  if the animation
  1389.                       is not a script.
  1390.  
  1391.                    AA_SCRIPTCONTENTS    -  104
  1392.                       
  1393.                       Returns a  global memory  handle containing
  1394.                       the contents  of the  script.  This  handle
  1395.                       contains the script as it would appear in a
  1396.                       text file,  and is  terminated  by  a  null
  1397.                       character. If  the script  is empty, or the
  1398.                       animation is  not a  script,  zero  is  re-
  1399.                       turned.
  1400.  
  1401.                    AA_LASTERROR         -  1001
  1402.                       
  1403.                       Return the code for the last error detected
  1404.                       by the  player. This  type should  be  used
  1405.                       immediately after  detecting  an  error  to
  1406.                       determine  the   error.  If  the  animation
  1407.                       handle is  zero, the player will search for
  1408.                       the last error for the calling application.
  1409.                       If the  animation handle is a valid handle,
  1410.                       the player  searches for the last error for
  1411.                       the application  owning the  animation. The
  1412.                       error codes are:
  1413.  
  1414.                       AA_ERR_NOERROR    -  0
  1415.                          No error was detected.
  1416.  
  1417.                       AA_ERR_NOMEMORY   -  256
  1418.                          An out of memory condition was detected.
  1419.  
  1420.                       AA_ERR_BADHANDLE  -  257
  1421.                          The handle  used in the last call to the
  1422.                          player was invalid.
  1423.  
  1424.                       AA_ERR_NOTIMERS   -  258
  1425.                          A system  timer could  not be  allocated
  1426.                          for the animation.
  1427.  
  1428.                       AA_ERR_BADSOUND   -  259
  1429.                          The sound could not be opened.
  1430.  
  1431.                       AA_ERR_NOSCRIPT   -  260
  1432.                          The  operation   in  error   requires  a
  1433.                          script.
  1434.  
  1435.                       AA_ERR_WRITEERR   -  261
  1436.                          An  error   occured  while   saving  the
  1437.                          script.
  1438.  
  1439.                       AA_ERR_BADANIMATION - 262
  1440.                          The animation could no be opened.
  1441.  
  1442.                       AA_ERR_BADWINDOWHANDLE - 512
  1443.                          An invalid  window handle  was given  to
  1444.                          the player.
  1445.  
  1446.                       AA_ERR_WINDOWCREATE - 513
  1447.                          An  error   occured  when  creating  the
  1448.                          animation window.
  1449.  
  1450.                       AA_ERR_DLGERROR   -  514
  1451.                          An  unexpected   error   occured   while
  1452.                          processing a dialog box.
  1453.  
  1454.                       AA_ERR_INVALIDSTATUS  768
  1455.                          The function failed because the state of
  1456.                          the animation did not allow it.
  1457.  
  1458.                       AA_ERR_BADDIBFORMAT - 769
  1459.                          The Windows DIB file is corrupted.
  1460.  
  1461.                       AA_ERR_BADFLIFORMAT - 770
  1462.                          The Autodesk  Animator or  Animator  Pro
  1463.                          file is corrupted.
  1464.  
  1465.                       AA_ERR_UNRECOGNIZEDFORMAT  771
  1466.                          The file is in an unrecognized format.
  1467.  
  1468.                       AA_ERR_NOSOUND    -  772
  1469.                          Sound is not supported by the player.
  1470.  
  1471.                       AA_ERR_NOTVALIDFORSCRIPTS  773
  1472.                          The request  is not allowed for scripts,
  1473.                          only for animations.
  1474.  
  1475.                       AA_ERR_INVALIDFILE - 774
  1476.                          The file  handle for  the  animation  is
  1477.                          invalid.
  1478.  
  1479.                       AA_ERR_NOSCRIPTS  -  775
  1480.                          Scripts are not supported by the player.
  1481.  
  1482.                       AA_ERR_SPEED      -  1024
  1483.                          The speed  is invalid. The speed must be
  1484.                          from 19 to 1000 milliseconds.
  1485.  
  1486.                       AA_ERR_LOOPS      -  1025
  1487.                          The loops  are invalid.  The  number  of
  1488.                          loops may range from 0 to 999.
  1489.  
  1490.                       AA_ERR_RPTSOUND   -  1026
  1491.                          The  number  of  sound  repetitions  are
  1492.                          invalid. This  value may range from 0 to
  1493.                          1000.
  1494.  
  1495.                       AA_ERR_PAUSE      -  1027
  1496.                          The time  to pause  at the  end  of  the
  1497.                          animation is  invalid.  This  value  may
  1498.                          range from 0 to 50000 milliseconds.
  1499.  
  1500.                       AA_ERR_TRANSIN    -  1028
  1501.                          The  starting   transition  is  invalid.
  1502.                          Transitions must  be one  of  the  codes
  1503.                          described above.
  1504.  
  1505.                       AA_ERR_TIMEIN     -  1029
  1506.                          The duration  of the starting transition
  1507.                          is invalid.  It ranges from 250 to 10000
  1508.                          milliseconds.
  1509.  
  1510.                       AA_ERR_TRANSOUT   -  1030
  1511.                          The ending  transition  is  invalid.  It
  1512.                          must  be  one  of  the  codes  described
  1513.                          above.
  1514.  
  1515.                       AA_ERR_TIMEOUT    -  1031
  1516.                          The time  of the  ending  transition  is
  1517.                          invalid. It  may rang  from 250 to 10000
  1518.                          milliseconds.
  1519.  
  1520.                       AA_ERR_DELAYSND   -  1032
  1521.                          The delay of the sound from the start of
  1522.                          the animation  is invalid.  It may range
  1523.                          from -3000000 to 3000000 milliseconds.
  1524.  
  1525.                       AA_ERR_INVALIDTYPE - 1033
  1526.                          The   type    parameter   to   aaGetParm
  1527.                          aaSetParm   or    aaSetParmIndirect   is
  1528.                          invalid.
  1529.  
  1530.                       AA_ERR_DUPLICATENOTIFY - 1280
  1531.                          An attempt  was made  to add a duplicate
  1532.                          notification.
  1533.  
  1534.                       AA_ERR_NOSWITCH   -  1536
  1535.                          A  script  line  is  missing  an  option
  1536.                          switch, or the switch is invalid.
  1537.  
  1538.                       AA_ERR_PARSELOOPS -  1537
  1539.                          The number  of loops on a script line is
  1540.                          invalid.
  1541.  
  1542.                       AA_ERR_PARSESPEED -  1538
  1543.                          The speed on a script line is invalid.
  1544.  
  1545.                       AA_ERR_BADRPTSOUND - 1540
  1546.                          The number  of sound  repetitions  on  a
  1547.                          script line is invalid.
  1548.  
  1549.                       AA_ERR_PARSEPAUSE -  1541
  1550.                          The pause  at the end of an animation on
  1551.                          a script line is invalid.
  1552.  
  1553.                       AA_ERR_PARSETRANS -  1542
  1554.                          A transition value is invalid.
  1555.  
  1556.                       AA_ERR_PARSEDELAYSND - 1543
  1557.                          The delay  of a sound from the beginning
  1558.                          of the animation is invalid.
  1559.  
  1560.                    AA_LASTERRORMESSAGE  -  1002
  1561.  
  1562.                       A handle  to a  string containing  text for
  1563.                       the error code retrieved by AA_LASTERROR is
  1564.                       returned. This string may be displayed in a
  1565.                       message box.  If the  error is in a script,
  1566.                       and the  animation name  of the  line which
  1567.                       caused the  error is known, the name of the
  1568.                       animation  will  be  in  the  message.  The
  1569.                       player will  also copy  the message  into a
  1570.                       buffer, if aaSetParm is used.
  1571.  
  1572.  
  1573. _________________________________________________________________
  1574.  
  1575. aaGetParmIndirect
  1576.  
  1577. Syntax       BOOL aaGetParmIndirect(hAa, lpAparm, wSize)
  1578.              
  1579.              Gets parameters  for playing  the animation  into  a
  1580.              structure. This  allows an application to easily ob-
  1581.              tain all of an animations parameters.
  1582.  
  1583. Parameters   HAA hAa
  1584.                 
  1585.                 A handle returned by aaLoad.
  1586.  
  1587.              LPAAPARMS lpAparm
  1588.                 
  1589.                 A long  pointer to the structure used to hold the
  1590.                 parameters. The format of this structure is:
  1591.  
  1592.                 struct {
  1593.                    BYTE        aa_status;        /* offset  0 */
  1594.                    BYTE        aa_filetype;      /* offset  1 */
  1595.                    BYTE        aa_mode;          /* offset  2 */
  1596.                    BYTE        aa_bitpix;        /* offset  3 */
  1597.                 
  1598.                    HWND        aa_hwnd;          /* offset  4 */
  1599.                    int         aa_x,             /* offset  6 */
  1600.                                aa_y,             /* offset  8 */
  1601.                                aa_cx,            /* offset 10 */
  1602.                                aa_cy;            /* offset 12 */
  1603.                    int         aa_orgx,          /* offset 14 */                               aa_orgy;          /* offset 16 */
  1604.                 
  1605.                    AASPEED     aa_speed;         /* offset 18 */
  1606.                    AASPEED     aa_designspeed;   /* offset 20 */
  1607.                 
  1608.                    WORD        aa_frames;        /* offset 22 */
  1609.                 
  1610.                    DWORD       aa_position;      /* offset 24 */
  1611.                    DWORD       aa_loops;         /* offset 28 */
  1612.                    WORD        aa_rptsound;      /* offset 30 */
  1613.                    WORD        aa_pause;         /* offset 32 */
  1614.                    LONG        aa_delaysnd;      /* offset 34 */
  1615.                    BYTE        aa_transin;       /* offset 36 */
  1616.                    BYTE        aa_transout;      /* offset 37 */
  1617.                    WORD        aa_timein;        /* offset 38 */
  1618.                    WORD        aa_timeout;       /* offset 40 */
  1619.                    HWND        aa_callback;      /* offset 42 */
  1620.                    HWND        aa_animwnd;       /* offset 44 */
  1621.                 };
  1622.  
  1623.                 The contents of each field is described in aaGet-
  1624.                 Parm.
  1625.  
  1626.              WORD wSize
  1627.                 
  1628.                 The size of the parameter structure.
  1629.  
  1630. _________________________________________________________________
  1631.  
  1632. aaSetParm
  1633.  
  1634. Syntax       HAA aaSetParm(hAa, wType, wValue1, lValue2)
  1635.              
  1636.              Sets parameters  for playing  the animation. The use
  1637.              of wValue1  and lValue2 depends on wType. The values
  1638.              of each  field is described in aaGetParm. The handle
  1639.              of the  animation with  the new  parameters  is  re-
  1640.              turned. If  the value  could not be set, NULL is re-
  1641.              turned. When  NULL is  returned, the original anima-
  1642.              tion handle is still valid.
  1643.  
  1644. Parameters   HAA hAa
  1645.                 
  1646.                 A handle returned by aaLoad.
  1647.  
  1648.              WORD wType
  1649.                 
  1650.                 The type  of parameter  to be  set. The values of
  1651.                 wValue1 and lValue2 vary depending on the parame-
  1652.                 ter type.
  1653.  
  1654.                    AA_MODE              -  3                      
  1655.                       wValue1 is  the current  mode of the anima-
  1656.                       tion. The  low order  word of  lValue2 is a
  1657.                       mask for  setting  the  mode.  Mode  values
  1658.                       which are  not to  be set  can inhibited by
  1659.                       adding the value into the mask.
  1660.  
  1661.                    AA_WINDOW            -  4
  1662.                       
  1663.                       wValue1 is  a the  handle of  a  window  in
  1664.                       which the  animation is  to play.  The call
  1665.                       back window  is changed  if it has not been
  1666.                       changed to another window handle.
  1667.  
  1668.                    AA_SPEED             -  5
  1669.                       
  1670.                       wValue1 is  the speed,  in milliseconds per
  1671.                       frame.
  1672.  
  1673.                    AA_POSITION          -  8
  1674.                       
  1675.                       lValue2 is  the number  of frames and loops
  1676.                       the frame position is to be moved. The high
  1677.                       order word  is the number of loops, the low
  1678.                       order word  is the number of frames. If the
  1679.                       frames value wraps past the end of the ani-
  1680.                       mation, it is carried into the loops value.
  1681.  
  1682.                       wValue1 specifies the starting position. It
  1683.                       is 0 if the starting position is the begin-
  1684.                       ning of  the animation,  1 if  the starting
  1685.                       position is the current frame, and 2 if the
  1686.                       starting position  is the end of the anima-
  1687.                       tion.
  1688.  
  1689.                       If the  position is  set while an animation
  1690.                       is stopped,  the animation  will start from
  1691.                       the given position, instead of from the be-
  1692.                       ginning. In  this case any sound associated
  1693.                       with the animation is also started from its
  1694.                       current position.
  1695.  
  1696.                    AA_LOOPS             -  9
  1697.                       
  1698.                       lValue2 is  the position  of the  frame  at
  1699.                       which the animation ends.
  1700.  
  1701.                       If the  value of  the high  order  word  of                      AA_LOOPS is  AA_LOOPSOUND (which is 65535),
  1702.                       then the  animation loops  until the  sound
  1703.                       finishes playing.  If the low order word is
  1704.                       also this  value, the  animation  will  end
  1705.                       with the  sound. Otherwise,  the  animation
  1706.                       will stop  on the frame number given by the
  1707.                       low order  word, after  the sound  has fin-
  1708.                       ished. In the limited version of the player
  1709.                       the value  AA_LOOPSOUND is accepted, but it
  1710.                       is  interpreted  as  though  the  animation
  1711.                       plays forever.
  1712.  
  1713.                    AA_X                 -  10
  1714.                       
  1715.                       wValue1 is  the x  coordinate of  the upper
  1716.                       left corner of the animation window.
  1717.  
  1718.                    AA_Y                 -  11
  1719.                       
  1720.                       wValue1 is  the y  coordinate of  the upper
  1721.                       left corner of the animation window.
  1722.  
  1723.                    AA_CX                -  12
  1724.                       
  1725.                       wValue1 is  the width of the animation win-
  1726.                       dow.
  1727.  
  1728.                    AA_CY                -  13
  1729.                       
  1730.                       wValue1 is the height of the animation win-
  1731.                       dow.
  1732.                       
  1733.                    AA_ORGX              -  14
  1734.                       
  1735.                       wValue1 is  the x  coordinate in the anima-
  1736.                       tion, displayed at the upper left corner of
  1737.                       the animation window.
  1738.  
  1739.                    AA_ORGY              -  15
  1740.                       
  1741.                       wValue1 is  the y  coordinate in the anima-
  1742.                       tion, display  at the  upper left corner of
  1743.                       the animation window.
  1744.  
  1745.                    AA_RPTSOUND          -  18
  1746.                       
  1747.                       wValue1 is the number of times the sound is
  1748.                       to repeat before stopping. The sound is al-
  1749.                       ways stopped  when the animation is stopped
  1750.                       or  paused.  The  limited  version  of  the
  1751.                       player ignore this parameter.
  1752.  
  1753.                    AA_PAUSE             -  19
  1754.                       
  1755.                       wValue1 is  the length of time to pause the
  1756.                       animation at its end, in milliseconds.
  1757.  
  1758.                    AA_DELAYSND          -  20                      
  1759.                       lValue2 is  the length of time to delay the
  1760.                       sound from  the start  of the  animation in
  1761.                       milliseconds. The  delay is negative if the
  1762.                       sound is to start before the animation. The
  1763.                       limited version  of the  player ignore this
  1764.                       parameter.
  1765.  
  1766.                    AA_TRANSIN           -  21
  1767.  
  1768.                       wValue1 is the transition at the beginning
  1769.                       of the animation. This transition may be:
  1770.  
  1771.                       AA_CUT            -  0
  1772.                          
  1773.                          No transition is performed.
  1774.  
  1775.                       AA_FADEBLACK      -  1
  1776.                          
  1777.                          Fade from black transition is performed.
  1778.  
  1779.                       AA_FADEWHITE      -  2
  1780.                          
  1781.                          Fade from white transition is performed.
  1782.  
  1783.                    AA_TRANSOUT       -  22
  1784.  
  1785.                       wValue1 is the transition at the end of the
  1786.                       animation. The transition may be:
  1787.  
  1788.                       AA_CUT            -  0
  1789.                          
  1790.                          No transition is performed.
  1791.  
  1792.                       AA_FADEBLACK      -  1
  1793.                          
  1794.                          Fade to black transition is performed.
  1795.  
  1796.                       AA_FADEWHITE      -  2
  1797.                          
  1798.                          Fade to white transition is performed.
  1799.  
  1800.                    AA_TIMEIN            -  23
  1801.  
  1802.                       wValue1 is the duration of the transition
  1803.                       at the beginning of the animation in
  1804.                       milliseconds. This duration may be from
  1805.                       .250 seconds to 10.000 seconds.
  1806.  
  1807.                    AA_TIMEOUT        -24
  1808.  
  1809.                       wValue1 is the duration of the transition
  1810.                       at the end of the animation in
  1811.                       milliseconds. This duration may be from
  1812.                       .250 seconds to 10.00 seconds.
  1813.  
  1814.                    AA_CALLBACK       -  25                      
  1815.                       wValue1 is the handle of the window used to
  1816.                       receive   the   status   and   notification
  1817.                       messages.
  1818.  
  1819.                    AA_ANIMWND        -  26
  1820.                       
  1821.                       wValue1 is  the handle  of the  window that
  1822.                       actually contains the animation.
  1823.  
  1824.                    AA_MODFLAG           -  100
  1825.                       
  1826.                       wValue1 contains  the modified flag for the
  1827.                       script. Zero  means the script is not modi-
  1828.                       fied and  a non-zero value means the script
  1829.                       is modified.  The limited  version  of  the
  1830.                       player ignore this parameter.
  1831.  
  1832.                    AA_SCRIPTNAME        -  101
  1833.                       
  1834.                       lValue2 contains  a pointer to the new name
  1835.                       of the  script. If  lValue2  is  zero,  the
  1836.                       script is  untitled. The limited version of
  1837.                       the player ignore this parameter.
  1838.  
  1839.                    AA_ANIMATION         -  102
  1840.                       
  1841.                       lValue2 contains  the number  of the anima-
  1842.                       tion in the script which is to become visi-
  1843.                       ble. The  limited version of the player ig-
  1844.                       nore this parameter.
  1845.  
  1846.                       wValue1 specifies the starting position. It
  1847.                       is 0 if the starting position is the begin-
  1848.                       ning of  the animation,  1 if  the starting
  1849.                       position is the current frame, and 2 if the
  1850.                       starting position  is the end of the anima-
  1851.                       tion.
  1852.  
  1853.                    AA_LASTERRORMESSAGE  -  1002
  1854.                       
  1855.                       The string  containing text  for the  error
  1856.                       code retrieved  by AA_LASTERROR  is  copied
  1857.                       into a  buffer. The buffer size is given in
  1858.                       wValue1, and  the address  of the buffer is
  1859.                       given  in   lValue2.  This  string  may  be
  1860.                       displayed in a message box. If the error is
  1861.                       in a  script, and the animation name of the
  1862.                       line which  caused the  error is known, the
  1863.                       name  of  the  animation  will  be  in  the
  1864.                       message. The  player  will  also  return  a
  1865.                       handle to the message text, if aaGetParm is
  1866.                       used.
  1867.  
  1868. _________________________________________________________________
  1869. aaSetParmIndirect
  1870.  
  1871. Syntax       HAA aaSetParmIndirect(hAa, dwType, lpAparm, wMask)
  1872.              
  1873.              Sets the  animation parameters from a structure. The
  1874.              handle of  the animation  with the new parameters is
  1875.              returned. If the value could not be set, NULL is re-
  1876.              turned. When  NULL is  returned, the original anima-
  1877.              tion handle is still valid.
  1878.  
  1879. Parameters   HAA hAa
  1880.                 
  1881.                 A handle returned by aaLoad.
  1882.  
  1883.              DWORD dwType
  1884.                 
  1885.                 A mask  containing a  bit for each parameter. Any
  1886.                 parameter is set only when the corresponding mask
  1887.                 bit is  on. The  following values define the mask
  1888.                 bits:
  1889.  
  1890.                    AA_SETMODE           -  1
  1891.                    AA_SETWINDOW         -  2
  1892.                    AA_SETSPEED          -  4
  1893.                    AA_SETPOSITION       -  8
  1894.                    AA_SETLOOPS          -  16
  1895.                    AA_SETX              -  32
  1896.                    AA_SETY              -  64
  1897.                    AA_SETCX             -  128
  1898.                    AA_SETCY             -  256
  1899.                    AA_SETORGX           -  512
  1900.                    AA_SETORGY           -  1024
  1901.                    AA_SETRPTSOUND       -  2048
  1902.                    AA_SETPAUSE          -  4096
  1903.                    AA_SETDELAYSND       -  8192
  1904.  
  1905.              LPAAPARMS lpAparm
  1906.                    
  1907.                 A long  pointer to  the structure  containing the
  1908.                 parameters being set. See aaGetParmIndirect for a
  1909.                 description of this structure.
  1910.  
  1911.              WORD wMask
  1912.                 
  1913.                 A mask used for setting the mode if AA_SETMODE is
  1914.                 set in wType. Setting of specific mode values can
  1915.                 be inhibited  by adding  the value  not to be set
  1916.                 into this  argument. This  argument is  used only
  1917.                 when AA_SETMODE is set in wType.
  1918.  
  1919. _________________________________________________________________
  1920. aaShow
  1921.  
  1922. Syntax       BOOL aaShow(hAa, bShow)
  1923.              
  1924.              Shows or hides the animation window. This setting is
  1925.              independent of  the mode  value AA_HIDEWINDOW.  This
  1926.              routine will hide playing animations and show hidden
  1927.              stopped animations.
  1928.  
  1929. Parameters   HAA hAa
  1930.                 
  1931.                 The handle of the animation returned by aaLoad.
  1932.  
  1933.              BOOL bShow
  1934.                 
  1935.                 The animation  window is  shown if bShow is TRUE,
  1936.                 and hidden if bShow is FALSE.
  1937.  
  1938. _________________________________________________________________
  1939.  
  1940. aaSound
  1941.  
  1942. Syntax       BOOL aaSound(hAa, lpszDevice, lpszSound, wMode)
  1943.              
  1944.              Associates a  sound with  an animation. The sound is
  1945.              begun with  the animation and will end when the ani-
  1946.              mation ends,  unless it  is shorter  than the anima-
  1947.              tion. If it is shorter than the animation, it can be
  1948.              looped using  aaSetParm with  AA_RPTSOUND. FALSE  is
  1949.              always  returned  by  the  limited  version  of  the
  1950.              player.
  1951.  
  1952.              If the  appropriate flag  is set  in wMode, when the
  1953.              sound is  associated, an alias for the sound is cre-
  1954.              ated. This alias is formed by concatenating the word
  1955.              "AAPLAY" and  the decimal  value of the handle, hAa.
  1956.              This alias  can be  used to alter the playing of the
  1957.              sound.
  1958.  
  1959. Parameters   HAA hAa
  1960.                 
  1961.                 The handle of the animation returned by aaLoad.
  1962.  
  1963.              LPSTR lpszDevice
  1964.                 
  1965.                 If AA_SNDDEVICEID is not set in wMode, this argu-
  1966.                 ment contains the name of the device used to play
  1967.                 the sound. If you have setup MCI extensions, this
  1968.                 argument can be NULL. If AA_SNDDEVICEID is set in
  1969.                 wMode, this argument contains the MultiMedia Con-
  1970.                 trol Interface Type ID.
  1971.  
  1972.              LPSTR lpszSound
  1973.                 
  1974.                 Either the  name of the file containing the sound
  1975.                 to be played, or a string used to play the sound.
  1976.                 The format  of the  file must be supported by the                device used  to play  it. If the device specified
  1977.                 by lpszDevice is not given, or requires a file to
  1978.                 be played,  this argument is the name of the file
  1979.                 to play.  If the  device does  not use  files for
  1980.                 playing  (cdaudio,  videodisc,  videotape,  etc),
  1981.                 this argument  contains the play arguments for an
  1982.                 MCI Command string to the device.
  1983.  
  1984.              WORD wMode
  1985.                 
  1986.                 This argument  gives the  mode of  the sound  The
  1987.                 following modes are valid:
  1988.  
  1989.                 AA_SNDFREEZE            -  1
  1990.                    Normally the  animation continues to play when
  1991.                    the  sound  is  being  prepared  for  playing.
  1992.                    Setting this  value prevents this from happen-
  1993.                    ing.
  1994.  
  1995.                 AA_SNDDEVICEID          -  256
  1996.                    Indicates that  the device  value is  not  the
  1997.                    name of  a sound device, but is the MultiMedia
  1998.                    Control Interface Type ID.
  1999.  
  2000. _________________________________________________________________
  2001.  
  2002. aaGetCaps
  2003. Syntax       WORD aaGetCaps(type)
  2004.              
  2005.              Returns information  on the  current capabilities of
  2006.              the animation player.
  2007.  
  2008. Parameters   WORD type
  2009.                 
  2010.                 The type  of information to be returned. This pa-
  2011.                 rameter can take on the following values:
  2012.  
  2013.                 AA_CAP_TIMER      -  1
  2014.                    Returns the accuracy of the timer in millisec-
  2015.                    onds. The  time between  successive frames  is
  2016.                    always an  integral multiple  of the value re-
  2017.                    turned. The  value returned is 55 milliseconds
  2018.                    if  the  Multimedia  extensions  are  not  in-
  2019.                    stalled, or  1 millisecond  if the  extensions
  2020.                    are installed.
  2021.  
  2022.                 AA_CAP_SOUND      -  2
  2023.                    Returns zero if sound support is not available
  2024.                    in the  player. Otherwise  a non-zero value is
  2025.                    returned. Sound  is not  available in the lim-
  2026.                    ited version  of the  player, when  the Multi-
  2027.                    media extensions  are not  installed, or  when
  2028.                    there are  no drivers  in the [MCI] section of
  2029.                    system.ini. Some  versions of  the player  may
  2030.                    not support sound even when the Multimedia ex-
  2031.                    tensions are  installed and  there are drivers
  2032.                    in the [MCI] section of system.ini.
  2033.                 AA_CAP_SCRIPT     -  3
  2034.                    Returns zero  if script  support is not avail-
  2035.                    able in the player. Otherwise a non-zero value
  2036.                    is returned.  Scripts are not available in the
  2037.                    limited version of the player.
  2038.  
  2039. _________________________________________________________________
  2040.  
  2041. aaGetFile
  2042. Syntax       int aaGetFile(wFlags, lpzFileName, wSizeFile, lpzDe-
  2043.                             viceName, wSizeDevice)
  2044.                             
  2045.              Prompts the  user for the name of a file, and copies
  2046.              the name  entered to  the location addressed by lpz-
  2047.              FileName. If  the file  is the name of a sound file,
  2048.              the Sound  device name is copied to the location ad-
  2049.              dressed by  lpzDeviceName. The return value is 0, if
  2050.              the user  presses the  cancel button,  -1 if the se-
  2051.              lected file  does not exist, or a positive number if
  2052.              the selected file does exist.
  2053.  
  2054. Parameters   WORD wFlags
  2055.                 
  2056.                 Flags used  to control  the  dialog  box.  It  is
  2057.                 formed by adding the following values:
  2058.  
  2059.                 AA_GETFILE_MUSTEXIST -  1
  2060.                    If set  the file  entered  must  exist  before
  2061.                    aaGetFile will return.
  2062.  
  2063.                 AA_GETFILE_NOSHOWSPEC-  2
  2064.                    If set  the search  specification is  not dis-
  2065.                    played in the file name edit control.
  2066.  
  2067.                 AA_GETFILE_SAVE      -  4
  2068.                    If set  the  OK  button  is  changed  to  read
  2069.                    "Save", and  the caption reads "Save". Setting
  2070.                    this    value     automatically    sets    the
  2071.                    AA_GETFILE_USEFILE flag.  This flag is ignored
  2072.                    in the limited version of the player.
  2073.  
  2074.                 AA_GETFILE_OPEN      -  8
  2075.                    If set  the  OK  button  is  changed  to  read
  2076.                    "Open", and the caption reads "Open"
  2077.  
  2078.                 AA_GETFILE_USEDIR    -  16
  2079.                    If set  the directory  of the current contents
  2080.                    of the string addressed by lpzFileName is used
  2081.                    as the initial directory in the dialog.
  2082.  
  2083.                 AA_GETFILE_USEFILE   -  32
  2084.                    If set  the file  name of the current contents
  2085.                    of the  string addressed by lpzFileName is put
  2086.                    in the file name edit control.
  2087.  
  2088.                 AA_GETFILE_SOUND     -  64
  2089.                    If set  the file specification for sound files
  2090.                    is used  in the  dialog, and the caption reads
  2091.                    "Sound".  If   neither  AA_GETFILE_SOUND   nor
  2092.                    AA_GETFILE_SCRIPT is  set in  wFlags, the file
  2093.                    specification for  animation and  script files
  2094.                    is used  in the  dialog, and the caption reads
  2095.                    "Animation". Setting  this flag will cause the
  2096.                    limited version  of the   player  to return 0,
  2097.                    indicating the cancel button was pressed.
  2098.  
  2099.                 AA_GETFILE_SCRIPT    -  128
  2100.                    If set the file specification for script files
  2101.                    is used  in the  dialog, and the caption reads
  2102.                    "Script".  If   neither  AA_GETFILE_SOUND  nor
  2103.                    AA_GETFILE_SCRIPT is  set in  wFlags, the file
  2104.                    specification for  animation and  script files
  2105.                    is used  in the  dialog, and the caption reads
  2106.                    "Animation". Setting  this flag will cause the
  2107.                    limited version  of the   player  to return 0,
  2108.                    indicating the cancel button was pressed.
  2109.  
  2110.              LPSTR lpzFileName
  2111.                 
  2112.                 A pointer  to a string used to hold the file name
  2113.                 entered.
  2114.  
  2115.              WORD wSizeFile
  2116.                 
  2117.                 The maximum  size of  the file  name which can be
  2118.                 returned.
  2119.  
  2120.              LPSTR lpzDeviceName
  2121.                 
  2122.                 A pointer  to a string used to hold the Sound De-
  2123.                 vice name entered. This parameter is only used if
  2124.                 AA_GETFILE_SOUND is set in wFlags.
  2125.  
  2126.              WORD wSizeDevice
  2127.                 
  2128.                 The maximum  size of  the Sound Device name which
  2129.                 can be returned..
  2130.  
  2131. _________________________________________________________________
  2132.  
  2133. aaSave
  2134. Syntax       BOOL aaSave(hAa, wMode)
  2135.              
  2136.              Saves the script of the animation whose handle is
  2137.              hAa. Returns TRUE is the script is saved, otherwise
  2138.              FALSE is returned. False is always returned by the
  2139.              limited version of the player.
  2140.  
  2141. Parameters   HAA hAa
  2142.                 
  2143.                 The handle of the animation returned by aaLoad.
  2144.  
  2145.              WORD wMode                
  2146.                 The mode used to save the animation. It is formed
  2147.                 by adding the following values:
  2148.  
  2149.                 AA_SAVE_IFMODIFIED   -  1
  2150.                    The script  is only saved if it has been modi-
  2151.                    fied.
  2152.  
  2153.                 AA_SAVE_AS           -  2
  2154.                    The user  is prompted  for a  new file name to
  2155.                    save the  script. If  the script  is untitled,
  2156.                    the used  is always  prompted for a file name,
  2157.                    whether or not this flag is set.
  2158.  
  2159. Error Dialogs
  2160. The following error messages are presented in dialogs:
  2161.  
  2162. The  animation   can                         The Test  button was  pressed in the Pa-
  2163. not be  tested  with                         rameters dialog,  but an  error occurred
  2164. the selected parame-                         when the animation was run.
  2165. ters.
  2166.  
  2167. The selected parame-                         The OK button was pressed in the Parame-
  2168. ters  can   not   be                         ters dialog,  but an error prevented the
  2169. changed in this ani-                         parameters from being changed.
  2170. mation.
  2171.  
  2172. The value  for speed                         The speed  entered was either not a num-
  2173. is  invalid.  Please                         ber or  was outside  of the valid range.
  2174. enter  a  value  be-                         The valid range is displayed in the mes-
  2175. tween nn.n and nn.n.                         sage.
  2176.  
  2177. The value  for loops                         The loops  entered was either not in the
  2178. is  invalid.  Please                         proper format  or  was  outside  of  the
  2179. enter  a  value  be-                         valid range.  The valid  range  is  dis-
  2180. tween  nnnn:nnn  and                         played in the message.
  2181. nnnn:nnn.
  2182.  
  2183. The value  for dura-                         The duration  entered was  either not in
  2184. tion   is   invalid.                         the proper  format or was outside of the
  2185. Please enter a value                         valid range.  The valid  range  is  dis-
  2186. between    mm:ss.sss                         played in the message.
  2187. and mm:ss.sss.
  2188.  
  2189. The number  of times                         The repeat  value for  sound was  either
  2190. the sound  is to  be                         not a number or was outside of the valid
  2191. repeated is invalid.                         range. The  valid range  is displayed in
  2192. Please enter a value                         the message.
  2193. between nnn and nnn.
  2194.  
  2195. The value  for paus-                         The pause at end value  was either not a
  2196. ing the animation is                         number  or  was  outside  of  the  valid
  2197. invalid. Please  en-                         range. The  valid range  is displayed in
  2198. ter a  value between                         the message.
  2199. nn.nnn and nn.nnn.
  2200.  
  2201. The value  for delay                         The delay  sound value  was either not a
  2202. sound  is   invalid.                         number  or  was  outside  of  the  valid
  2203. Please enter a value                         range. The  valid range  is displayed in
  2204. between    mm:nn.nnn                         the message.
  2205. and mm:nn.nnn.
  2206.  
  2207. The number of frames                         The length  of the animation changed af-
  2208. found in  the anima-                         ter the animation was loaded.
  2209. tion was incorrect.
  2210.  
  2211. Loops   cannot    be                         The value chosen for loops would require
  2212. changed while  Dura-                         that the  duration be  changed, but  the
  2213. tion is  locked  and                         duration  is   locked  and  can  not  be
  2214. has    the     value                         changed.
  2215. mm:ss.sss.
  2216.  
  2217. Duration  cannot  be                         The value  chosen for duration would re-
  2218. changed while  loops                         quire that the loops be changed, but the
  2219. is  locked  and  has                         loops are locked and can not be changed.
  2220. the value nnnn:nnn.
  2221.  
  2222. In the  following messages the file name following Script: is the
  2223. name of  the script  in which  the error  occurred. The file name
  2224. following Line:  is the  name of the animation on which the error
  2225. was found.
  2226.  
  2227. Script:  xxx\xxx\xxx                         A file  error occurred  while saving the
  2228. An  error   occurred                         script. The  disk is  probably full,  or
  2229. while   saving   the                         the script may be read only.
  2230. script.
  2231.  
  2232. Script:  xxx\xxx\xxx                         A memory allocation error occurred.
  2233. Internal Error!  In-
  2234. sufficient    memory
  2235. for operation.
  2236.  
  2237. Script:  xxx\xxx\xxx                         While reading  a script an option begin-
  2238. Line:    xxx\xxx\xxx                         ning with  a '-'  was expected.  Instead
  2239. Expected      switch                         the characters displayed were found.
  2240. found "xxxxx".
  2241.  
  2242. Script:  xxx\xxx\xxx                         The loop  count entered  on  the  script
  2243. Line:    xxx\xxx\xxx                         line was either not in the proper format
  2244. Loop count, "xxxxx",                         or out of range.
  2245. is invalid.
  2246.  
  2247. Script:  xxx\xxx\xxx                         The  animation   speed  entered  on  the
  2248. Line:    xxx\xxx\xxx                         script line  was either  not a number or
  2249. Animation     speed,                         out of range.
  2250. "xxxxx", is invalid.
  2251.  
  2252. Script:  xxx\xxx\xxx                         The number  of sound  repeats entered on
  2253. Line:    xxx\xxx\xxx                         the script  line was either not a number
  2254. Number of  sound re-                         or out of range.
  2255. peats,  "xxxxx",  is
  2256. invalid.
  2257.  
  2258. Script:  xxx\xxx\xxx                         The length of pause at the animation end
  2259. Line:    xxx\xxx\xxx                         was either not a number or out of range.
  2260. Animation      pause
  2261. time,  "xxxxx",   is
  2262. invalid.
  2263.  
  2264. Script:  xxx\xxx\xxx                         The sound delay  was either not a number
  2265. Line:    xxx\xxx\xxx                         or out of range.
  2266. The   sound   delay,
  2267. "xxxxx", is invalid.
  2268.  
  2269. Script:  xxx\xxx\xxx                         The options  for the  line are inconsis-
  2270. Line:    xxx\xxx\xxx                         tent and could not be set.
  2271. An  error   occurred
  2272. changing the parame-
  2273. ters for this line.
  2274.  
  2275. The following messages allow Yes or No responses from the user.
  2276.  
  2277. Script:  xxx\xxx\xxx                         Presented when  a modified script is un-
  2278. The animation script                         loaded  using   aaUnload.  If  the  user
  2279. has  been  modified.                         presses Yes,  a file save dialog is pre-
  2280. Do you  want to save                         sented and the user can select a file to
  2281. the script?                                  save the script. If the user presses No,
  2282.                                              the modifications are lost.
  2283.  
  2284. Script:  xxx\xxx\xxx                         Presented when  the user  selects an ex-
  2285. The  script  already                         isting file  from the  file save dialog.
  2286. exists. Do  you want                         This can  happen when  unloading a modi-
  2287. to   overwrite   the                         fied script,  or when  using aaSave with
  2288. current script?                              AA_SAVE_AS set.  If Yes  is pressed, the
  2289.                                              existing file  is overwritten.  If No is
  2290.                                              pressed, the  user is  prompted for  an-
  2291.                                              other file  name. If  cancel is pressed,
  2292.                                              the save  operation is  canceled,  which
  2293.                                              may cause modifications to be lost.
  2294.  
  2295.