Press the a key to see changes.
Download the sample file

Keyboard Interaction and If statement

Use Insert->media element->font, find a  postscript font to import into the movie.

Use the text tool in the tool palette to create a word.

Highlight the word, use modify->font...   Find the font you imported, it will have an asterik *.


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


Add a behavior for the text:

Choose the text on you typed  on the stage.

dir_behedit.jpg

Open the Window->Inspectors->Behavior Inspector.

Click and hold on the top
+ button to add a new behavior.   dir_behplus.jpg
         Name it   rotate

In the Behavior Inspector Window, click the small arrow pointing right to see more options. dir_r_arrow.jpg

Click and hold on the second
+  button down  to add the command ExitFrame.

Bring up the Window->Script window
   You may need to click the
until you find the rotate script you created.

Type the following in the new behavior script you just created.


on beginSprite
  member
(21).regPoint = point(160,17--change the center of the font
end

on
exitFrame 
  if the keypressed = "a" then
    sprite(1).rotation = sprite(1).rotation + 5
  end if
end



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