Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
adec #1
problem with key.isDown
Hi,
Some people at work asked for an fdisk simulator, so they could run it whilst
they had customers on the phones, so imagine the screenshots from fdisk.
On the first screen you have options 1 - 5. if you select 1 it jumps to the
relevant frame / screenshot, and you are now presented with options 1 - 3,
here you could choose 1 again, and it takes you to the next relevant frame /
screenshot.
On the first page I was using the code :
onClipEvent (enterFrame) {
if (Key.isDown(49)){
_root.gotoAndPlay(8);
}
else if (Key.isDown(50)){
_root.gotoAndPlay(27);
}
else if (Key.isDown(51)){
_root.gotoAndPlay(29);
}
else if (Key.isDown(52)){
_root.gotoAndPlay(6);
}
else if (Key.isDown(53)){
_root.gotoAndPlay(4);
}
}
seemed ok, but Flash seems to be recording multiple keystrokes when you press
1 ... this has the effect of continuing through the movie until it gets to a
frame where there is no option to press 1
If you hit the 1 key v v lightly, then it all works...
any ideas ?
adec Guest
-
Detect F10 Key.isDown
there is a way around this issue... however, it does not stop windows from reporting the F10 key press to the flash player... the result is, what... -
Please explain this Key.isDown glitch...
I have the following line of code placed on a keyframe in my movie which is producing inconsistent results (described below) in different evironments... -
Problem playing Quicktime thru .DCR embedded in HTML - pathreferencing problem?
Greetings earthlings and Director heads. Here's the problem: created an HTML file containing shockwave (dcr) movie that calls quicktime movies in... -
Uploading problem = weird warning (was: access denied problem.....)
Hi, I had a problem where my upload form was not working on our production server but was working on two other servers, after checking the... -
Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I... -
kglad #2
Re: problem with key.isDown
if the movieclip to which that code is attached exists on any of those target
frames you'll have trouble because it is going to detect multiple key presses
unless you press and release rapidly (or, at least, more rapid than the inverse
of your movie's framerate).
kglad Guest
-
adec #3
Re: problem with key.isDown
yeah which is why I am now wondering about using something like Key Up or Release or something similar as oppose to Key.isDown... hopefully that would eliminate it ?
adec Guest
-
kglad #4
Re: problem with key.isDown
there are a number of ways to remedy the problem. and yes, Key.isUp should work without problem.
kglad Guest
-
adec #5
Re: problem with key.isDown
Key.isUp doesn't exist .... although it would be nice .... the solution was to
change the code to :
onClipEvent (keyUP) {
if (Key.getCode()== 49){
_root.gotoAndPlay(8);
}
else if (Key.getCode()== 50){
_root.gotoAndPlay(27);
}
else if (Key.getCode() == 51){
_root.gotoAndPlay(29);
}
else if (Key.getCode() ==52){
_root.gotoAndPlay(6);
}
else if (Key.getCode()==53){
_root.gotoAndPlay(4);
}
}
thanks for your help
adec Guest
-
kglad #6
Re: problem with key.isDown
well, that wasn't very nice off mm. a key listener with onKeyUp should also work.
kglad Guest



Reply With Quote

