ggshow,
[quoted text, click to view] > if (Key.isDown(77) && Key.isDown(16)) { ... }
> works for Shift+M, and works for M+Shift as well
That's right.
[quoted text, click to view] > how about this one:
>
> var myListener:Object = new Object();
> myListener.onKeyDown = function() {
> if (Key.isDown(77)) {
Checking for M, so far.
[quoted text, click to view] > if (_root.key == "Shift") {
Now checking the value of a variable in the main timeline. If the value
of this variable is the string "Shift", then ...
[quoted text, click to view] > carrier1.carrierJet.gotoAndPlay(2);
> delete this.onKeyDown;
> }
.... a movie clip by the instance name carrierJet is told to go to frame 2
and play. This carrierJet is nested inside another movie clip with the
instance name carrier1 (or carrier1 is some other object with a property
that points to carrierJet).
If if above is not true ...
[quoted text, click to view] > } else {
> if (Key.isDown(16)) {
> _root.key = "Shift";
.... then *if* one of the shift keys is pressed, set that root variable to
the string "Shift".
Well ... to be honest, I'm not sure what that key variable is for. If I
understood right, Angyl wanted to test for the condition of Shift and the
key M at the same time. If so, the simplest route is to simply check for
both those keys. I'm not sure why a variable help matters, but maybe you
could explain?
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/ "Luck is the residue of good design."