home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Archived / Updates / Flash / writeflash / Examples / playsound < prev    next >
Text File  |  2000-06-04  |  737b  |  56 lines

  1.  
  2. FileVersion 1
  3.  
  4. // all units are in 1/20th of a pixel
  5. FrameArea {
  6.   width 4000
  7.   height 3000
  8. }
  9.  
  10. // frames per second
  11. FrameRate 5.0
  12.  
  13. BackgroundColour { 128 0 128 }
  14.  
  15. // define the shape
  16. DefineShape {
  17.   id 1
  18.   fillstyle { solid ffffffff }
  19.   selectfillstyle0 1
  20.   moveby { 1000 1000 }
  21.   lineby { 1000 1000 }
  22.   lineby { 1000 -1000 }
  23.   lineby { -1000 -1000 }
  24.   lineby { -1000 1000 }
  25. }
  26.  
  27. // place the shape on the screen
  28. PlaceObject {
  29.   depth 1
  30.   id 1
  31.   matrix {
  32.     65536           // scale x and y
  33.     0 500           // translate
  34.   }
  35. }
  36.  
  37. DefineSound {
  38.   id 100
  39.   file "$.Blast"
  40.   format "LIN8"
  41.   channels 1
  42.   freq 22
  43. }
  44.  
  45. // wait 20 frames (4 seconds)
  46. :for i = 1 to 20
  47. ShowFrame { }
  48. :next
  49.  
  50. // play the sound
  51. PlaySound {
  52.   id 100
  53. }
  54.  
  55. ShowFrame { }
  56.