Press the arrow keys to see changes.
Download the sample file

Arrow Keys and if statements

Import Images of Words from Photoshop

The text will look best if you type the text in the alpha channel, leave the RGB channel black.

Choose File-Import...
            Select your file,  Click Import.

Drag and drop the image from the Cast Window on to the Stage Window.

Edit the Score Script with Lingo

Double click the first box in the score script.  See the diagram below.

dir_score2.jpg

A script window will appear.  Type the following behavior in the score script.

on exitFrame me
  go to the frame
end


on
keyDown
 
  if chartonum(the key) = 30 then      --up
    sprite(1).locV = sprite(1).locV - 15
    sprite
(1).member = member "up"
 
end if
 
  if
chartonum(the key) = 31 then      --down
    sprite(1).locV = sprite(1).locV + 15
    sprite(1).member = member "down"
 
end if
 
  if chartonum(the key) = 28 then      --left
    sprite(1).locH = sprite(1).locH - 15
    sprite
(1).member = member "left"
 
end if
 
  if chartonum(the key) = 29 then      --right
    sprite(1).locH = sprite(1).locH + 15
    sprite
(1).member = member "right"
  end if 
 
end


Funny Keyboard Example:
http://hotwired.lycos.com/animation/collection/laurence_arcadias/iloveyou