A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: button that responds to keypress?

  1. #1
    Junior Member
    Join Date
    Jul 2004
    Posts
    1

    Unhappy button that responds to keypress?

    i'm having a great deal of trouble with what seemingly should be a simple action - i need my button to respond to a keypress.
    my problem is that i don't want to apply any other actions. all i require is that the button responds to a key in exactly the same manner as it does with the mouse click. i don't want an action that makes the movie 'go to and play' with a keypress - just a keypress that makes the button play its mousedown state.
    please help !! i can't seem to find any answers !! (maybe my problem is just too simple for people to write tutorials about).

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Dont think its possible with a button since its behaviour is not targetable.
    I would make a movieclip instead with animation on its timeline and a invisible button inside it to navigate thru the different " states" of the movieclip.
    But then of course you need some goto actions ( but they can be triggered by key events).

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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