Listing 2. CanDo Deck for Playing An ANIM Using AnimManager ************* * Deck "ZPlayAnim" * Time 20:58:48 * Date 09/26/93 ************* ************* * Card(s) in deck. * Card "PlayAnim" ************* * 1 Card(s), 1 were printed. ************* ************* * Natural order of Cards * Card "PlayAnim" ************* ************* * Global Routine(s) in deck. * Routine "Communicate" ************* * 1 Global routines(s), 1 were printed. ************* ************* * Card "PlayAnim" BeforeAttachment ; used to be OnStartup Do "Communicate" EndScript Window "UserWindow" Definition Origin 0,0 Size 320,400 Title "Play Animation Using AnimManager" NumberOfColors 32,69636 WindowColors 0,1,0 ; Detail, Block, Background WindowObjects CLOSEBUTTON WindowFlags ACTIVATE SEPARATESCREEN TOFRONT EndScript OnCloseButton Quit EndScript EndObject TextButton "PlayAnim" Definition Origin 200,138 Font "topaz",8 ; FontName, PointSize PrintStyle PLAIN ,2,3 ; Style, Pen1, Pen2 TextColors 1,0,NORMAL ; PenA, PenB, DrawMode Text " Play Anim " Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen Highlight COMPLEMENT ButtonFlags NONE EndScript OnRelease Do "Communicate" SendMessage "KeyControls On" SendMessage "AddButton "||Q||"ClickButton"||Q||",0,0,50,50" SendMessage "Play Forward" Let AnimButton=FALSE EndScript EndObject TextButton "StopAnim" Definition Origin 200,180 Font "topaz",8 ; FontName, PointSize PrintStyle PLAIN ,2,3 ; Style, Pen1, Pen2 TextColors 1,0,NORMAL ; PenA, PenB, DrawMode Text " Stop Anim " Border BEVEL ,2,1 ; BorderStyle, MainPen, ExtraPen Highlight COMPLEMENT ButtonFlags NONE EndScript OnRelease SendMessage "Quit" EndScript EndObject ARexxMessage "PlaySound" Definition Message "FRAME" ; text to look for from ARexx EndScript Occurred PlaySound "CanDo:Sounds/Boing.snd" EndScript EndObject IntervalTimer "CheckQuit" Definition Duration 0,1,0 ; Minutes, Seconds, Jiffies EndScript Occurred If AnimButton=TRUE SendMessage "Screen ToBack" SendMessage "Quit" Let AnimButton=FALSE EndIf EndScript EndObject ARexxMessage "QuitFlag" Definition Message "CLICKBUTTON" ; text to look for from ARexx EndScript Occurred Let AnimButton=TRUE EndScript EndObject * End of Card "PlayAnim" ************* ************* * Global routine "Communicate" ListenTo "ANIMFrameEvent" SpeakTo "AnimRexxPort" IfError Dos "run >nil: