// © Copyright 1993-94 Apple Computer, Inc, All Rights Reserved constant kAppName := '|Crank:PIEDTS|; // ---- End Project Data ---- // ---- File Crank.t ---- baseView := {viewFlags: 1, viewFormat: nil, viewBounds: {left: 0, top: 0, right: 240, bottom: 336}, declareSelf: 'base, viewDrawScript: func() begin foreach lineShape in lineShapeArray do begin OffsetShape(lineShape,0,-scrollDistance); self:DoDrawing('DrawShape,[lineShape,{font: rom_fontsystem9}]); end; end, lineShapeArray: nil, viewSetupFormScript: func() begin constant kMaxAppWidth := 240 ; // original MP width constant kMaxAppHeight := 336 ; // original MP height local b := GetAppParams() ; // make view no bigger than the original MP viewBounds := RelBounds(b.appAreaLeft, b.appAreaTop, MIN(b.appAreaWidth, kMaxAppWidth), MIN(b.appAreaHeight, kMaxAppHeight)); lineShapeArray := Clone([]); for count := 0 to 19 do begin AddArraySlot(lineShapeArray,MakeText(GetRandomWord(5,20),0,0,240,300-count*scrollDistance)); end; timeToStop := nil; // let the madness begin :SetupIdle(10); end, scrollDistance: 14, viewIdleScript: func() begin local tempTextShape := MakeText(GetRandomWord(5,10) && GetRandomWord(5,10) && GetRandomWord(5,10) && GetRandomWord(5,10) && GetRandomWord(5,10) && GetRandomWord(5,10),0,280,240,300); AddArraySlot( RemoveSlot(lineShapeArray,0) , tempTextShape ); self:Dirty(); RefreshViews(); // Time to stop this crazy thing. if timeToStop = nil then return 10; else return nil; end, timeToStop: nil, viewclass: 74, debug: "baseView" }; _view000 := /* child of baseView */ {_proto: protoClosebox}; stopButton := /* child of baseView */ {text: "Stop The Insanity!", buttonClickScript: func() begin timeToStop := true; end, viewBounds: {left: 66, top: 290, right: 174, bottom: 302}, _proto: protoTextButton, debug: "stopButton" }; _view001 := /* child of baseView */ {_proto: protoStatus}; // ---- Beginning of section for non used Layout files ---- // End of output