home *** CD-ROM | disk | FTP | other *** search
/ DarkBasic Professional / DarkBasicPro.iso / data1.cab / Lang_Files_(English) / Help / examples / animation / animation2-example.dba < prev   
Encoding:
Text File  |  2004-09-22  |  1.8 KB  |  67 lines

  1. rem Animation Functionality
  2. AnimNumber=1
  3.  
  4. rem DVD Animation
  5. Title=1 : Chapter=1
  6. load dvd animation 1
  7. if total dvd chapters(Title,Chapter)>0
  8.  set dvd chapter AnimNumber,Title,Chapter
  9.  play animation AnimNumber,0,0,640,480
  10.  sleep 5000
  11.  delete animation AnimNumber
  12. endif
  13.  
  14. rem Full Screen Animation
  15. load animation "mpg\dbintro.mpg",AnimNumber
  16. play animation AnimNumber,0,0,640,480
  17. sleep 2000
  18. delete animation AnimNumber
  19.  
  20. rem Looping Animation
  21. load animation "mpg\dbintro.mpg",AnimNumber
  22. loop animation AnimNumber
  23. sleep 2000
  24. delete animation AnimNumber
  25.  
  26. rem Controlled Animation
  27. load animation "mpg\dbintro.mpg",AnimNumber
  28. play animation AnimNumber,160,120 : sleep 2000
  29. stop animation AnimNumber
  30. play animation AnimNumber,0,0,640,480 : sleep 2000
  31. place animation AnimNumber,320,240,640,480 : sleep 2000
  32. pause animation AnimNumber : sleep 1000
  33. resume animation AnimNumber : sleep 2000
  34.  
  35. rem New Animation Commands
  36. TwiceSpeed=200
  37. HalfVolume=50
  38. set animation speed AnimNumber,TwiceSpeed
  39. set animation volume AnimNumber,HalfVolume
  40.  
  41. rem Animation Through Bitmap
  42. BitmapNumber=1
  43. play animation AnimNumber,BitmapNumber,0,0,640,240 : sleep 2000
  44. loop animation AnimNumber,BitmapNumber,0,240,640,480 : sleep 2000
  45.  
  46. rem Animation Expression Data
  47. while scancode()=0
  48.  cls
  49.  print "ANIMATION DATA"
  50.  print
  51.  print "exist:";animation exist(AnimNumber)
  52.  print "width:";animation width(AnimNumber)
  53.  print "height:";animation height(AnimNumber)
  54.  print "looped:";animation looping(AnimNumber)
  55.  print "playing:";animation playing(AnimNumber)
  56.  print "paused:";animation paused(AnimNumber)
  57.  print "x:";animation position x(AnimNumber)
  58.  print "y:";animation position y(AnimNumber)
  59.  print "speed:";animation speed(AnimNumber)
  60.  print "volume:";animation volume(AnimNumber)
  61.  print
  62.  print "Press Any Key"
  63. endwhile
  64.  
  65. rem Delete Animation
  66. delete animation AnimNumber
  67.