ReadKey crash's application - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

ReadKey crash's application

maddog321maddog321 Posts: 4Member
I'm trying to make a sidescroller sort of thing, its the first application/game I'm attempting to make. I've got ReadKey to work when making a program, but i can't get it to move this object.

[code]implementation

{$R *.lfm}

{ TfrmMap }

procedure TfrmMap.Timer1Timer(Sender: TObject);
begin
c:=readkey;
if c=#0 then
begin
c:=readkey;
case c of
#75 : shpPlayer.left:= shpPlayer.left - 1;
#77 : shpPlayer.left:= shpPlayer.left + 1;
end;
end;

end; [/code]

Could anyone help please? Thanks
Sign In or Register to comment.