dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] backspace not invoking listener (Key.isDown(Key.BACKSPACE))

  1. #1
    Junior Member
    Join Date
    May 2004
    Location
    Springfield, OR
    Posts
    21

    Question [F8] backspace not invoking listener (Key.isDown(Key.BACKSPACE))

    So I wrote some script on a computer running MacOS X (with Flash CS3 if that makes any difference, though it was AS2.0 and saving as a Flash 8 file), and it worked fine.

    Code:
    listener.onKeyDown = function():Void  {
    	if (Key.isDown(Key.ENTER)) {
    		play();
    	} else if (Key.isDown(Key.BACKSPACE) && count > 0) {
    		--count;
    		removeMovieClip(stack[count]);
    		if (count % 2 != 0) {
    			movebacks--;
    			for (i = 0; i < count; i++) {
    				stack[i]._x += 15;
    			}
    		}
    //breaks off here and the rest works
    I bring it home and try to work on it some more, running Windows XP (and Flash 8), pressing backspace doesn't invoke the listener. I can get it to work if I hold shift though (or ctrl) and hit backspace.

    Funny thing is, if i make a button that fires on key press of backspace (using on (keyPress "<Backspace>") ), same thing; needs two keys to detect it.

    I heard that ASnative(800, 0)(8) would do the trick, but it didn't.

    How might I go about doing this?

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    in the authoring environment, the Backspace key is
    the keyboard shortcut for - Clear

    from Test Movie > use menu - Control - to Disable Keyboard Shortcuts

  3. #3
    Junior Member
    Join Date
    May 2004
    Location
    Springfield, OR
    Posts
    21
    Thank you thank you thank you! On the Mac I realized I had to disable that immediatly as only the d and g key weren't keyboard shortcuts it seemed. I figured since a - z worked here, keyboard shortcuts were already off.

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