A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Mouse click + Key Press?

  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    33

    Lightbulb

    I'm trying to use a button on my site that you can only open (for novelty, not security) by holding down "`" and clicking. Is this possible? I tryed this:

    Code:
    on (release, keyPress "`") {
        getURL("http://www.mysite.com/mypage.php", "_self");
    }
    But, either the click OR the keypress opens mypage.php. Is there a way to say ONLY with release and the keypress to getURL? Thanks for any help!

    Brando


  2. #2
    Junior Member
    Join Date
    Jul 2002
    Posts
    19
    on (release && keypress "'") {
    statements
    }
    might work

  3. #3
    Member
    Join Date
    Jul 2002
    Posts
    33
    That didn't work.

  4. #4
    Member
    Join Date
    Jul 2002
    Posts
    33
    Any other ideas?

  5. #5
    Member
    Join Date
    Jul 2002
    Posts
    33
    *BUMP*

  6. #6
    Senior Member
    Join Date
    Nov 2001
    Posts
    667
    Code:
    on (release) {
    	if (Key.isDown(192)) {
    		getURL("http://www.mysite.com/mypage.php", "_self");
    	}
    }
    192 is the key code for the ` (backstick).

  7. #7
    Member
    Join Date
    Jul 2002
    Posts
    33
    Thank you! Works great!

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