home *** CD-ROM | disk | FTP | other *** search
- 'Client application - the walker
-
- RUN "StdSys"
- RUN "Animate"
-
- PROC EndWalk(p)
- IF p[_Invoke] <> _Close THEN
- AnimateControl(_Stop)
- FormModifyObject(20,_Normal,100 pct,100 pct)
- DDEControl(_Poke, "Command", "ManOut")
- END IF
- END PROC
-
- PROC MakeForm
- LOCAL width, i, j, cell
- 'Create a form with an animation window
- FormNew(FormQUnique; "Tech Walker", _Close)
- FormControl(_Size;_Center, _Center, 100 pct, 100 pct)
- FormSetObject(20,_Animate,"",_Center,_Center,100 pct,100 pct)
- FormControl(_Show)
- FormSetProc(EndWalk)
-
- 'Prepare the animation
- AnimateSelect(20)
- AnimateCells("\realizer\demos\animate\bitmaps\MAN#.BMP", 1, 3)
- CellOrder = {1, 2, 3, 2}
-
- width = FormQObject(20)[_FQO_Width]
- j = 0
- i = 0
- WHILE j < width
- cell = CellOrder[i Mod 4 + 1]
- AnimateFrame(cell, j, 10, 100)
- i = i + 1
- j = j + 15
- END WHILE
- AnimateSpecialFrame(_Notify)
- AnimateSpecialFrame(_Stop)
- END PROC
-
-
- PROC HandleDDE(Session, message, Topic, Data)
- IF Message = _Close THEN
- EXIT SYSTEM
- END IF
-
- DDESelect(Session)
- IF Topic = "Command" THEN
- SELECT CASE Data
- CASE "TooMany"
- INPUT "Sorry, too many sessions are running.";
- EXIT SYSTEM
- CASE "StartWalk"
- AnimateControl(_Restart)
- FormModifyObject(20, _Normal, _Center, _Center, 100 pct, 100 pct)
- END SELECT
- ELSEIF Topic = "Title" THEN
- SetAppName(Data)
- END IF
- END PROC
-
- SetSys(_Size, {_Default, _Default, 60 pct, 40 pct})
- MakeForm
-
- IF DDENew(DDEQUnique, "PCTech", "Animate") THEN
- DDESetProc(HandleDDE)
- ELSE
- INPUT "Please make sure the controller is running.";
- EXIT SYSTEM
- END IF
-