home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 1.2 KB | 64 lines | [TEXT/ToyS] |
- property gasWin : 0
- property gasLoc : {40, 60}
-
- global gasPic
- global gasRot, gasCent
-
-
- on run
- open (choose file)
- end run
-
-
- on open fsObj
- set gasWin to display drawing titled ¬
- "Wheeee!" located at gasLoc ¬
- starting with (the image from fsObj)
-
- set gasPic to capture picture from gasWin
- set gasRot to 0
-
- set dims to window dimensions of gasWin
- display drawing gasWin with disposal
-
- set x to item 1 of dims
- set y to item 2 of dims
-
- if (x > y) then
- set y to x
- else
- set x to y
- end if
-
- set gasWin to display drawing titled ¬
- "Wheeee!" located at gasLoc ¬
- with dimensions {x, y}
-
- draw a box into gasWin ¬
- inside of {0, 0, x, y} ¬
- filling it with the pen
-
- set gasCent to {x div 2, y div 2}
- end open
-
-
- on idle
- set cg to conglomerate of (input state)
- repeat while (conglomerate of (input state) is cg)
- set gasRot to gasRot + 36
- draw a picture into gasWin using data (rotate image gasPic by gasRot) ¬
- offset by gasCent justified flush dead center without recording
- end repeat
-
- set gasRot to gasRot mod 3600
-
- return 2
- end idle
-
-
- on quit
- set gasPic to 0
- set gasLoc to screen location of (display drawing gasWin with disposal)
- continue quit
- end quit
-