home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / anim / exam04.dba < prev   
Encoding:
Text File  |  1999-10-22  |  1.7 KB  |  64 lines

  1. Rem * Title  : Display Anim Data
  2. Rem * Author : DBS-LB
  3. Rem * Date   : 1st Sept 99
  4. rem =======================================================
  5. rem DARK BASIC EXAMPLE PROGRAM 4
  6. rem =======================================================
  7. rem This program will load and get info about a anim file 
  8. rem -------------------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.  
  13. rem Clear the screen
  14. cls 
  15.  
  16. rem Load a animation file into number one
  17. load animation "avi\demo1.avi",1
  18. create bitmap 1,animation width(1),animation height(1)
  19. loop animation 1,1,0,0,80,60
  20. set current bitmap 0
  21.  
  22. rem This command will check if there is a animation number one
  23. if animation exist(1)=1:print "there is a animation number one":endif
  24.  
  25. rem This command will check if the animation number one is playing
  26. if animation playing(1)=1
  27.     print "the animation is playing"
  28. else
  29.     print "the animation is not playing"
  30. endif
  31.  
  32. rem Get animation dimensions
  33. print animation position x(1)
  34. print animation position y(1)
  35. print animation width(1)
  36. print animation height(1)
  37.  
  38. rem This command will check if the animation number one is looping
  39. if animation looping(1)=1
  40.     print "the animation is looping"
  41. else
  42.     print "the animation is not looping"
  43. endif
  44.  
  45. rem This command will check if the animation number one is paused
  46. if animation paused(1)=1
  47.     print "the animation is paused"
  48. else
  49.     print "the animation is not paused"
  50. endif
  51.  
  52. rem Project hidden animation onto a sphere
  53. backdrop off
  54. make object sphere 1,200
  55. set current bitmap 1
  56. sync on
  57. do
  58.  get image 1,0,0,80,60
  59.  texture object 1,1
  60.  xrotate object 1,wrapvalue(object angle x(1)+2)
  61.  sync
  62. loop
  63.  
  64.