dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Keyboard control in Flash 4

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    14
    How can I control my flash movie by keyboard in flash 4?

    Just want to gotoAndPlay ("Scene x", x); using the space bar!

  2. #2
    Member
    Join Date
    Mar 2001
    Location
    Venice, CA
    Posts
    88
    You can do this by creating an invisible button and placing it on the stage where you want the key command to register, and then on the actions tab, deselect "on release" and select "on key command"

    Code:
    On (Key: <Space>)
          Go to and Stop (Scene 1, "x")
    End On
    The only catch is, the invisible button will cause the mouse cursor to change to a hand. To prevent this, move the invisible button off stage and you should be fine (I haven't done full tests of this, but so far it seems to work).

    Hope that helps,
    Kate

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Posts
    14
    Hi Katharine,

    Thanks for your reply! Got what I wanted in a round-a-bout sort of way! I was trying to export a Flash 4 file from Flash 5, but couldn't understand why the Flash 4 code wasn't working!!! Didn't even realise there was an automated function for doing this in Flash - should have read the manual hey?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center