Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
key press (trapping the alt key)

key press (trapping the alt key)

2004-02-06       - By Adams, Matt

 Back
This kind of relates to a lingering problem I've had.  I would love to know
of a way to trap the Alt key before the OS grabs hold of it.  (Sounds
impossible)  I'm creating a simulator in which the user will have a host of
keyboard shortcuts using the Alt key (e.g. alt+x), but either the browser,
projector, Flash player, etc... grabs the key press before it can make it to
the movie.  Since the users will be on a training PCs, we can regulate any
key trapping software loaded.  If anyone knows of a way to trap the key or
of any software that can regulate the key, not disable it, please let me
know!

Thanks!

- Matt


-- --Original Message-- --
From: Daniel Kessler [mailto:danielk@(protected)]
Sent: Friday, February 06, 2004 9:36 AM
To: flashnewbie@(protected)
Subject: RE: [Flashnewbie] key press


I had been meaning to look into a multi-key sequence to activate my
easter egg, so this thread started me.  I mutated Andreas' script to
work in my setup and thought it might be of use to someone else.  I'm
activating the easter egg on CONTROL-SHIFT-D, which is 68.  Seems to
work ok.

var keyTester = new Object();
keyTester.onKeyDown = function(){
  if(Key.isDown(Key.SHIFT) && Key.isDown(Key.CONTROL) &&
Key.isDown(68)){
    myFunction();
    return;
  }
  myFunctionTrace();
}
Key.addListener(keyTester);

function myFunction(){
  trace('multi-function was called');
}

function myFunctionTrace(){
  trace('single key press: ' + Key.getCode());
}



>catAButton.onRelease = myFunction;
>
>var keyTester = new Object();
>
>keyTester.onKeyDown = function(){
>   if(Key.getCode() == 49){
>     myFunction();
>   }
>}
>Key.addListener(keyTester);
>
>function myFunction(){
>   trace('function was called'+1);
>}
>
>-- ---- ------
>Andreas Weber
>motiondraw.com
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>-- --Original Message-- --
>From: Adrian McTaggart [mailto:AMacTaggart@(protected)]
>Sent: Friday, February 06, 2004 11:46 AM
>To: flashnewbie@(protected)
>Subject: [Flashnewbie] key press
>
>
>I have the following code for an mc acting as a button:
>
>-- ---- ---- ---- ---- ---- ---- ---- ---- -----
>catAButton.onRelease = function() {
>   the button actions are in here
>};
>-- ---- ---- ---- ---- ---- ---- ---- ---- ----
>
>This works fine but I'd like to extend it so that the actions take place
>when the user presses '1' on the keyboard in addition to using the mouse.
>How can I adapt the code to make this work?
>
>TIA,
>
>Adrian
>
>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>Supported by Fig Leaf Software
>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>Lower Prices for Certified Training! Check out new lower prices for
>Certified Macromedia Training from Fig Leaf Software. Expand your
>skill set with courses in ColdFusion, Flash, Rich Internet
>Applications and .NET in the new year.  Fig Leaf Software provides
>the highest caliber instruction at our training centers in Washington
>D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
>your location.
>
>Get the details at http://training.figleaf.com/
>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
>To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
>For additional commands, e-mail: flashnewbie-help@(protected)
>
>
>
>
>
>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>Supported by Fig Leaf Software
>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>Lower Prices for Certified Training! Check out new lower prices for
>Certified Macromedia Training from Fig Leaf Software. Expand your
>skill set with courses in ColdFusion, Flash, Rich Internet
>Applications and .NET in the new year.  Fig Leaf Software provides
>the highest caliber instruction at our training centers in Washington
>D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
>your location.
>
>Get the details at http://training.figleaf.com/
>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
>To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
>For additional commands, e-mail: flashnewbie-help@(protected)


--
Daniel Kessler

Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
301-405-2545 Phone
www.phi.umd.edu

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
For additional commands, e-mail: flashnewbie-help@(protected)



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-- ---- ----
***National City made the following annotations
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-- ---- ----

This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s).  If this
communication is received in error, please contact the sender and delete this
communication.
===============================================================================
============

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
For additional commands, e-mail: flashnewbie-help@(protected)





Earn $52 per hosting referral at Lunarpages.