Ascii Codes For Function Keys
Does anyone know what the character numbers for the Function keys ont he keyboard are? I need Flash to respond to a user pressing the F12 key but am not sure what to put into a kay handler, I try using key.F12 but that did not work and the Function keys are not listed in the list of mapped by name ones like key.CONTROL, key.SHIFT and so on, so I think I need to get the actual number for them like A is (65) I think,, Thanks in advance
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-15-2003, 05:36 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Getting Ascii Codes
How do u find the ascii code of a char within a string
Ï'm trying to display text from a text file in a movie. the text file has 3 var in it
delay .........the amount of time each line is displayed
text...........lines of text ending with a return
eof............this is declared false in the script and set to true at thr end of the file.
I'm trying to search for the return(13) at the end of each line so i can break them up in to separate string that will be displayed one at a time
[Edited by johntigner on 03-14-2002 at 12:23 AM]
ASCII Key Codes
look at my ASCII key code creater...
http://www.geocities.com/zosflash/ascii.swf
hope you like it
ASCII-Codes For External Textfile Import?
Hi,
I want use external Textfiles in my page. How do i have to convert Chars like "=" <Return>s... Is there a way to mark words in the textfile to display them bold or italic in the swf?
maybe someone can give me a list of the codes??
Please help me fast!
crazybYte
Keys Codes Help
Hello, i am working on something very important for me but
i have one problem.
How can i know the codes of every keys (code like 88 = z..u know what i mean)?
If there is any guides that will explain it to me it also will help...
ASCII Function
Hi, is there a function where I can get the ASCII val of something, (not key press).
EG variable = variable.ASCIIValue;
M@
ASCII Function
Hi, is there a function where I can get the ASCII val of something, (not key press).
EG variable = variable.ASCIIValue;
M@
OnKeyDown=function Using ASCII Code Not Working
I am using Flash MX 2004 v7.2.
I want the user to press the semicolon key to advance to a frame with a label name of hide.
I have tried the following in the frame I want the action to occur:
Creating a movie clip off the stage with a stage name of hidesome and creating the frames for the interaction within it. When I get to the frame where I want the user to press the semicolon key, I created another movie clip off the stage with a stage name of semi and actionscript as follows:
onClipEvent(enterFrame){
_level0.onKeyDown=function(){
if(Key.isDown(186)){
_root.hidesome.gotoAndStop("hide");
}else{
_root.hidesome.gotoAndStop("altsemi");
}
}
Key.addListener(_level0);
}
That didn't work but often key press stuff doesn't work for me unless I put it in a separte file and call that file from the main file. So, I tried that too. I created a movie clip in the main file that calls the .swf file of the separate file. The separate file contains all the frames for the interaction. In the frame that I want the user to press a semicolon, I use the above actionscript. I also tried the above actionscript in the separate file without the _root stuff, without the _level0 stuff, and with the movie name of the movie clip in the separate file instead of the name in the main file.
Help?
How To Assign ASCII Values To ByteArray By ASCII Value?
Hello folks,
How can I assign an ASCII value to a byte array by using the characters ASCII value (not the actual character). For example, 32 decimal (0x20 hex) is the code for a space -- how can I assign the space character to the first element in an ByteArray using 0x20 or 32?
Thanks!
Mike
Edited: 02/05/2008 at 11:11:50 AM by MikeSDCA
Music Codes, Youtube Codes In Flash Site
is it possible to make music codes when typed into an input field and then submitted using a button movie clip, work in a flash site? I mean the same way how they work on myspace, etc. Youtube codes too. If anyone knows how to do so, please help me to the information. Thank you very much.
Function Keys
I am trying to get my movie to go from frame 2 to frame 3 when the user presses F4. I tried using normal mode to complete the ActionScript:
on (keyPress "") {
gotoAndStop (3);
}
but it won't add F4 for me. My Macromedia ActionScript reference guide tells me that I can use the key code 115 to represent F4, but when I go in to Expert mode and change the ActionScript to:
on (keyPress "115") {
gotoAndStop (3);
}
I get an error message saying I've entered an invalid key code. Please help!
Function Keys (ie:F8, F9, F10)
Is there anyway that I can make a Flash projector do something when one of the Function Keys on the keyboard is pressed. For Example, When I press F10, I want a password dialog box to come up.
Function Keys...Help
Hello!
Actionscript is relatively new to me...and I am trying to use the F1 key within flash. I need my file to jump to the next frame on F1 button press. Is this possible?
Thanks in advance,
kpud
Function Keys
hi guys i want to replace the ENTER Key by the function key F9..PLS HELP ...
code:
ActionScript Code:
stop();attempt = 0;stepNo = 0;trace("lang_enter")var kObj = new Object();kObj.onKeyDown = function() { if (Key.isDown(Key.ENTER)) { Key.removeListener(kObj); play(); }};Key.addListener(kObj);
Mac OSX Function Keys
I saw a thread in here .... that discussed this issue, but I dont think the response solution was directed at OSX users. The problem is that the f5 key is used to enable sound increase... at least on the laptop it is, and flash uses f5 to add frames to the timeline. I cant seem to disable the mac function.
Any suggestions..
Detect FUNCTION Keys - HOW?
how can i detect the following keypresses without it's getting in action to the browser.
the F4 F6 F7 and F11 key.
when using on keypress its starts messing up my browser
plz ... is there a work around to get it still working
(needed to make an software simulation)
Detect FUNCTION Keys - HOW?
how can i detect the following keypresses without it's getting in action to the browser.
the F4 F6 F7 and F11 key.
when using on keypress its starts messing up my browser
plz ... is there a work around to get it still working
(needed to make an software simulation)
Function Keys Detection
Hello All,
How can I detect if a function ket like for e.g.: F4 is pressed. Can I make it work with the On event action?
Thank for the help.
Function Keys In Flash 4
Is i possible to use (F1,etc) to load actionscripts in Falsh 4?
Maybe with some Javascript?
Thanks in advice
Control Function KEYs
Hi everybody!
I have a question for you.
Is it possible to control a function key (F1 ,F2,...F12) ???
With a click on a "button" I want to execute the F11 key.
(same like pressing F11 on the keyboard)
Thanks!
Cejko
Traping Function Keys
Hi,
Is it possible to trap the functions keys particularly f1.
I want the application to quit on pressing f1. Is this possible.
thanks for your responses.
Function Keys As Navigation
I have a SWF which is a training program for a DOS program which uses the function keys (F2 to F11) as navigation.
Using a listener I have this functionality in the mc but, as soon as I run it in a browser the F keys suddenly take on their own use ie F5=refresh.
I must launch the SWF in a browser as it launches from a LMS and it must integrate as similar courseware does (which was developed in Authorware).
I am now downloading a demo of Authorware 6.5 as this apparently fully supports Flash MX. How best to overcome this problem and does AW 6.5 support ALL AS code?
Have already tried JavaScript to trap keys in IE but with the target platform this will not work.
cheers
Trapping Function Keys?
I need to simulate a BIOS program that uses keyboard input.
I set up fscommand("trapallkeys", "true") in the first frame of the movie and a key listener to detect when certain keys are pressed.
Problem: the movie responds to my F10 key press as it should but then the focus jumps up to the browser or Flash Player File menu. Trapallkeys doesn't neutralize the key and to continue the movie I have to click on the movie again.
Here is my code:
fscommand("trapallkeys", "true");
keyWatcher = new Object();
key.addListener(keyWatcher);
keyWatcher.onKeyDown = function() {
if (Key.isDown(121) {
FileMenu._visible=false;
}
}
Disable Function Keys
Hi
Does anyone know how to prevent f4,f5 from working in their browser(ie)? I can trap it when the browser has focus but not when flash object has focus..
code:
document.onkeydown = function(){
if(window.event && window.event.keyCode == 116)
{ // Capture and remap F5
window.event.keyCode = 506;
}
if(window.event && window.event.keyCode == 506)
{ // New action for F5
alert('F5 key was pressed');
return false;
}
}
//---------------------------
thanks
zerodonor
Disable Function Keys F1 And F5 - Again
The debate continues.... After reading the myriad of forum entries, I thought it was time to post one of my own.
Is there a way to disable function keys F5 and F1 in a swf? I have to use a swf and not a projector because of other fscommand calls that my flash needs to runs.
Below is the code i have "borrowed" from previous forum entries... as you can conclude, it doesn't work. Is there any headway that has been made into this area as a result of the AS2.0 release???
HTML/JavaScript code
document.onkeydown = function(){
if(window.event && window.event.keyCode == 116)
{ // Capture and remap F5
window.event.keyCode = 506;
}
if(window.event && window.event.keyCode == 506)
{ // New action for F5
alert('F5 key was pressed');
return false;
}
}
ActionScript code:
keyListener = new Object();
keyListener.onKeyDown = function() {
//getURL("javascript:alert('"+Key.getCode()+"')");
//trace (Key.getCode());
if (Key.getCode()>111 && Key.getCode()<=123) {
//trace (Key.getCode());
return false;
}
};
keyListener.onKeyUp = function() {
//getURL("javascript:alert('"+Key.getCode()+"')");
if (Key.getCode()>111 && Key.getCode()<=123) {
//trace (Key.getCode());
return false;
}
};
Key.addListener(keyListener);
Any thoughts/ideas????
M.
Capturing Function Keys
Does anyone know of a way of capturing the F1, F2, F3 keys etc. in Flash? I've been through the keycodes but none seem to represent these...
Thanks in advance for any help.
I Want To Use The Function Keys F1-F12 To Navigate
What I need. When F1 is hit it goes to frame 10, F2 goes to frame 15, and so on up to F12. Problems, IE has control of the Function Keys...so when you press F1 you get the IE Help Screen. I would like this to work in IE, so can the focus be changed/disabled? If not this project can be a stand alone .swf file which take IE out of the loop.
This has to be done with the function keys, no other keys would work with this project.
Has anyone had any luck with something like this before?
Any help is appreciated!!!
Trapping Of Function Keys F3,F5 Etc...
Hi
I am in urgent need to have an hint or solution how to Trap Function Keys. In my Project we are displaying our content in Flash in a Browser.
Now we need to disable the functions F3 F5 and others like ALT+TAB, ALT+F4, but unable to achieve success.
Is ther a way.
On the net even I read that ASNative functions are helpful and did not find any help. Could any one please help us out.
We will be very grateful of you.
Thanks & Rgds
Piyush
Trapping Of Function Keys F3,F5 Etc...
Hi
I am in urgent need to have an hint or solution how to Trap Function Keys. In my Project we are displaying our content in Flash in a Browser.
Now we need to disable the functions F3 F5 and others like ALT+TAB, ALT+F4, but unable to achieve success.
Is ther a way.
On the net even I read that ASNative functions are helpful and did not find any help. Could any one please help us out.
We will be very grateful of you.
Thanks & Rgds
Piyush
Detecting Function Keys (F1 -- F12)
I just need to know if this is possible.
Can I detect in Flash if the end-user presses one of the function key (F1 -- F12) on a laptop?
Thanks in advance.
Using 'FUNCTION KEYS' To Navigate Site?
Can anyone tell me how I would use the F1, F2, etc. keys to navigate through my site? I'm creating an online training course in flash, and I need to have the user use their function keys to move around in the program. Any help would be greatly appreciated. Thank you.
Lomax
Action Script Help - Function Keys
I've been reading through the tutorials, and help files, but I don't quiet understand how to do something.
Let's say I've got 3 images, and in my clip I'm on my fist image.
I want to be able to press F5 to go to image 2 which is on frame 5, and to press F11 to get in to image to which is on frame 10.
How exactly do I enable the function keys?
... here's one more thing. Let's say in the first frome i've got a text field that's empty, but I want the user to enter '1234' before the function keys become active. Is that possible?
Thanks for your help.
Key Press For Function Keys In Flash Movie.
I'm wondering if anyone knows if Flash's key press would override the browser's key press for function keys?
e.g. f5 will refresh the page, but if I put a f5 key press in my Flash movie, will it work instead of refreshing the page?
Gracias
[MX04] Recognizing Computer Function Keys
Hi,
I'm trying to use Flash MX 2004 professional to teach how to navigate within a mainframe application.
Here's what I'm trying to do:
Movie opens with the main menu screen
User enters the number of the file that they want to access and presses enter. (advance to next page)
User enters contract number in the applicable field and presses enter. User accesses screen particular to the contract number.
User wants to access other screens through use of a function key (e.g., F1 brings them to page 1, F2 brings them to page 2, and so forth).
I can get the code for use of the enter key to obtain the specific contract information but I cannot determine how the user will navigate to the different screens without entering any information on the page except viewing the page and then using a function key to access the other page.
Thank you for any information or help that you can give me.
Sincerely,
Robert
Code Needed For Shortcut Keys (access Keys) For Flash CS3
I have been looking for quite awhile for the code to allow the user to, for example, press ALT+I or CTRL+I in order to navigate on the installer screen for a CD. I started out with dynamic text boxes and then created invisible buttons behind that in order to get tabs to work. I am new at this so the little reference I found online or in Flash help lost me. Does anyone know what code is needed to get this to work--creating access keys in Flash 9?
Thanks for any help.
Adding Keys Other Than The Default Keys
Say you want to make a 2-player Flash game (I don’t quite know how yet but I’m getting there). I have noticed that the selection of keys is limited to only a few keys (The arrow keys are there, and so are keys like Shift and Caps Lock, but there are many missing). I have played Flash games that had a second player using the A,S,D, and W keys for movement as well as the arrow keys. My only guess on how to get these keys is with one of the following incomplete codes:
if(Key.isDown(Key.getAscii()))
if(Key.isDown(Key.addListener()))
if(Key.isDown(Key.getCode()))
if(Key.isDown(Key.removeListener())
Hey, please correct me on this if what I want to do has nothing to do with these. They’re my only guess. If one of these pieces of code will go in the direction that I want, please tell me how. Thanks!
How To Use Other Keys For "key.isDown" Function
hi,
im trying ot make some games, and use keys to do stuff, as most games do, and i can only seem to use the arrows or function keys (tab, pgdn, delete, space, etc) and i'm wondering, how can i set it up to use keys like w, s, a and d?
thanks
Ascii 0
I just wanted to know if anyone knows whether or not it is legal to use the null character in flash strings, I know it causes issues in sql so i wanted to know.
Are there other control characters that cause issues?
Ascii Art
ASCII problem,
I have an ASCII program that converts bitmaps to ASCII art,
I'd like to know how to load it,with actionscript from an external
ascii text file,And still maintain the image?
Pic->ascii
http://www.flavour.pl/ascii/index.html
one cool thingy made by flavour.pl
Using Ascii
I'm am trying to use ASCII codes for keyboard pressing.
Ex:
if(key.isDown( ascii code ) {
}
but i keep getting errors.
Can somone please help.
Tab Keys And Access Keys
I filled in the required info for dynamic textboxes in the accessibility panel but the tab keys still do not work in the exe file. Flash CS3.
Any clues?
Thanks.
HELP WITH KEYS (keyboard Keys)...
Hey, thanks for reading.
I need to be able to disable the keys used on Macs and PCs that exit or quit the player, so that the only way to close the player is to use the quit button.
The SWF will be played using the stand-alone player, not using a web page.
Incase you are not sure of which keys are the "exit keys",
on PCs it is 'Alt + F4'
on Macs it is 'Apple + Q', or 'command + Q'
on macs, the command key is the proper name, and apple key is the common name. If possible, when they (the user) press the apple or Alt key in any combination with any other key, nothing should happen, so that the player (in fullscreen) does not quit. As long as the player does not quit, any solution is a good solution.
Thanks, from Matt
PS: contact me using the following email address:
sugar_addict_500@hotmail.com
ASCII Characters?
How can i put ascii characters and latin/french letters etc in to my text fields?
ASCII Question
Real quick: Can anyone tell me what the ASCII equivalent of html <BR> is?
Get ASCII For Text
i am familiar with getting ascii code for a pressed key. . .
how do you get ascii for a given letter, say I want to convert a user imput string into a set of ascii values (for dupiating the ropriate MC's)
?? ny Ideas or code would be EXTREMELY helpfull. . .
thanks
dairn
How To Get Ascii Code
I would like to get the ascii code of a certain part of a string for eg. i want to get the ascii code of the following:
myString.charAt(2);
so how can i do it to STRINGS?
|