home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Archived / Updates / Flash / writeflash / Examples / loop1 < prev    next >
Text File  |  2000-04-19  |  1KB  |  59 lines

  1. // loop1
  2. // example script-file for writeflash
  3.  
  4. #define CIRCLE_ID       1
  5. #define CIRCLE_DEPTH    1
  6.  
  7.  
  8. FileVersion 1
  9.  
  10. FrameArea {
  11.   width 4000
  12.   height 4000
  13. }
  14.  
  15. FrameRate 25.0
  16.  
  17. BackgroundColour 800000
  18.  
  19.  
  20. DefineShape {
  21.   id CIRCLE_ID
  22.   fillstyle { solid ffffffff }
  23.   selectfillstyle0 1
  24.   // not really a circle, but who cares...
  25.   moveby { 0 1000 }
  26.   curveby { 0 1000 1000 0 }
  27.   curveby { 1000 0 0 -1000 }
  28.   curveby { 0 -1000 -1000 0 }
  29.   curveby { -1000 0 0 1000 }
  30. }
  31.  
  32. // create 30 frames - move the circle a bit to the left each time
  33. :for i = 1 to 30
  34. // don't remove the circle in the first frame - it hasn't been placed yet!
  35. :if i > 1
  36. RemoveObject { depth CIRCLE_DEPTH }
  37. :endif
  38.  
  39. // place the circle
  40. PlaceObject {
  41.   depth CIRCLE_DEPTH
  42.   id CIRCLE_ID
  43.   // a matrix with 3 entries specifies scaling/positionx/positiony
  44.   matrix { 65536 i*250-2000 500 }
  45. }
  46.  
  47. // when at last frame, loop back to the start
  48. :if i == 30
  49. DoAction {
  50.   gotoframe 0
  51.   play
  52. }
  53. :endif
  54.  
  55. :print i
  56. // end of frame - display it
  57. ShowFrame { }
  58. :next
  59.