Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Windows Keycodes


This isn't exactly Flash, but I can't find the answer anywhere on the net. I need a list of the keycodes for coding in Javascript. I was tweaking a script I found to suit my needs, and I wanted to know the codes for all letters. I know a==97 but that's all. Can somebody help me with them? Thanks.




FlashKit > Flash Help > Flash ActionScript
Posted on: 01-03-2002, 04:31 AM


View Complete Forum Thread with Replies

Sponsored Links:

Keycodes
now i would like some help in using specific keys in flash like "s" i know how to do it in lingo but theyre a bit different i use this for the default keys but how can i use the keycodes for the other keys?

onClipEvent (enterFrame) {
with (_root.fig) {
if (key.isDown(Key.LEFT)) {
_x -=15;
}
}
}

View Replies !    View Related
Help With Keycodes
I made a short little game using shift to fire and space to jump and realized this controlls were very awkward. so i wanted to make it so you used z to jump and x to fire. could anyone help me out?
here's my current actionscript:

function detectKeys() {
var ob = _root.char;
var keyPressed = false;
if (Key.isDown(Key.SPACE) and !ob.jump and !ob.climb) {
// jump
ob.jump = true;
ob.jumpspeed = ob.jumpstart;
if (Key.isDown(Key.SHIFT) and getTimer()>ob.lastshot+ob.shootspeed) {
_root.shoot(ob);
}

View Replies !    View Related
Keycodes
err.. ok

I need keycodes for all the buttons on the keyboard, I found them earlier on MX, but now it appears as if I can't find them again

Help would be appreciated

View Replies !    View Related
List Of Keycodes?
where can i get a list of keycodes? i need the key codes for RIGHT and LEFT.

View Replies !    View Related
Keycodes For The Mouse
Simple question:

I need to know the keycode to use in action script, when referring to the 'right click' of a mouse.

Like:

on (keypress "<???>") {
gotoAndStop("lose");
}

this is for a game, where if you rightclick, its cheating, so you go to the 'lose' frame.

i just need to know what to put there, for rightclicking.

lol its probly simple... i hope...

-thx
Jeff

View Replies !    View Related
Button Keycodes
Can you use key codes for buttons? I know how to for movie clips, but I haven't been able to figure out how to do the on keypress for buttons with a key besides the defaults.

View Replies !    View Related
List Of KeyCodes?
Hello. I'm new to AS3, so go easy on me. =-)

I have code that enables some very basic manipulation of some test movie clips; rotating, scaling, etc. based on keyboard inputs.

However, these keyboard events are limited to the F keys, Enter, Delete, NumPad, i.e. the standard set of non-alphanumeric keys.

How do I get the movies to respond to the user pressing 'q', for example, or 't', or really any other 'mainstream' keyboard buttons? Is there a list of keyCodes out there that can help me, or am I thinking this through at the wrong angle? Thanks for any help. =-)

-dE

View Replies !    View Related
List Of KeyCodes
Anyone mey help me with complete list of keyCodes ?

View Replies !    View Related
KeyCodes 4 Commas & Periods?
I've searched high and low, and I can't seem to find the corresponding keycode valures for the comma and the period.

Is there a specific function that I should set up? Or is there an actual number?

View Replies !    View Related
Simple Question: How To Get Keycodes?
I started to use Senocular's "KeyObject" class so I can detect multiple key presses. I can detect the named keys just fine using (in this example using the LEFT key):


Code:
if (key.isDown(Keyboard.LEFT))
or

Code:
if (key.isDown(key.LEFT))
But how do I detect the "w" key for instance? I know I would need to get the keycode for it, but I can't find the simple function call that returns the keycode for a given key.

Thanks for any help, I am going crazy trying to find the solution for this seemingly simple problem.

View Replies !    View Related
[F8] 2 Questions (export In First Frame, And Keycodes)
hey guys, just a couple of questions

#1 - i dynamically attach my background music based on certain conditions of my game. it seems i'm forced to do "export in first frame" in linkage, otherwise, it doesn't seem to work). my problem is the loader. the pre-loader doesn't start until all resources that are marked "export in 1st frame" are downloaded. so my movie seems like its frozen during the first 500 kb.

any way around it?

#2 - i made my game's control to be customizeable. so i have a screen that tell's the user the what key is assigned to what function (i.e. Jump = "space key")


right now, i'm using my own function to convert the keycodes to their corresponding "string" (i.e. "space" = 32). is there an internal flash function that can do this form me? String.fromCharCode() doesn't seem to be doing the trick.

thanks

View Replies !    View Related
ASCII Keycodes For Letters And Puntuations
Just list them if you could or link. even if you just have letters

View Replies !    View Related
ASCII Keycodes For Letters And Puntuations
Just list them if you could or link. even if you just have letters

View Replies !    View Related
Keycode Trace Function Not Outputting All Keycodes
The trace function in this file doesn't output all of the keycodes on my keyboard. Some letters generate a keycode and others don't. For instance, "u" outputs 85 but "i" outputs nothing.

Here's the trace function...
trace(event.keyCode);

And here's the rest of the code which is a work in progress...


package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;

public class Velocity3D extends Sprite
{
private var ball:Ball;
private var xpos:Number = 150;
private var ypos:Number = 0;
private var zpos:Number = 150;
private var vx:Number = 0;
private var vy:Number = 0;
private var vz:Number = 0;
private var friction:Number = .98;
private var fl:Number = 250;
private var vpX:Number = stage.stageWidth / 2;
private var vpY:Number = stage.stageHeight / 2;
private var ballb:Ball;
private var xposb:Number = 130;
private var yposb:Number = 0;
private var zposb:Number = 150;
private var vxb:Number = 0;
private var vyb:Number = 0;
private var vzb:Number = 0;

public function Velocity3D()
{
init();
}

private function init():void
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

ball = new Ball(40, 0xff0000);
ballb = new Ball(40, 0xffff00);
addChild(ball);
addChild(ballb);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);

}

private function onEnterFrame(event:Event):void
{
xpos += vx;
ypos += vy;
zpos += vz;

vx *= friction;
vy *= friction;
vz *= friction;

xposb += vx;
yposb += vy;
zposb += vz;

vxb *= friction;
vyb *= friction;
vzb *= friction;

if(zpos > -fl)
{
var scale:Number = fl / (fl + zpos);
ball.scaleX = ball.scaleY = scale;
ball.x = vpX + xpos * scale;
ball.y = vpY + ypos * scale;
ball.visible = true;
}
else
{
ball.visible = false;
}


if(zposb > -fl)
{
var scaleb:Number = fl / (fl + zposb);
ballb.scaleX = ballb.scaleY = scale;
ballb.x = vpX + xpos * scale;
ballb.y = vpY + ypos * scale;
ballb.visible = true;
}
else
{
ball.visible = false;
}
}

private function onKeyDown(event:KeyboardEvent):void
{
trace(event.keyCode);
switch(event.keyCode)
{
case 87 :
vy -= 1;
break;

case Keyboard.NUMPAD_2 :
vy += 1;
break;

case Keyboard.NUMPAD_4 :
vx -= 1;
break;

case Keyboard.NUMPAD_6 :
vx += 1;
break;

case Keyboard.UP :
vz += 1;
break;

case Keyboard.DOWN :
vz -= 1;
break;

case Keyboard.F1: //82
vyb -= 1;
break;

case Keyboard.F2 : //67
vyb += 1;
break;

case Keyboard.F3 : //68
vxb -= 1;
break;

case Keyboard.F4 : //70
vxb += 1;
break;

case Keyboard.F5 : //65
vzb += 1;
break;

case Keyboard.F6 : //90
vzb -= 1;
break;

default :
break;
}
}
}
}



-----

This is the ball class...

package {
import flash.display.Sprite;

public class Ball extends Sprite {
public var radius:Number;
private var color:uint;
public var vx:Number = 0;
public var vy:Number = 0;
public var mass:Number = 1;

public function Ball(radius:Number=40, color:uint=0xff0000) {
this.radius = radius;
this.color = color;
init();
}
public function init():void {
graphics.beginFill(color);
graphics.drawCircle(0, 0, radius);
graphics.endFill();
}
}
}

View Replies !    View Related
Using KeyCodes/Event Listeners To Naviaget Prev/next Label
Hi there, hope someone can help me. The code I've posted below effectively navigates from frame label to frame label using a mouse click eventListener. What has me stumped is I need to alter the code so specific keyboard presses trigger the navigation instead of mouse events, similar to powerpoint functionality:

Next label = keycode 40 & 32 ( Down arrow and space bar)
Previous frame (back to last bullet item) = keycode 38 (up arrow)

I made a vain attempt using KeybaordEvent, but this detects any keyboard action, not a specific key. Unfortunately, this is just a tad beyond my skillset so I would really appreciate some assistance!


stage.addEventListener(MouseEvent.CLICK, seekNextLabel);
stage.addEventListener(KeyboardEvent.KEY_UP, prevFrameLabel);

/*move forward to next label... need to use DOWN arrow AND space bar
instead of mouseclick*/

function seekNextLabel(event:MouseEvent) {
var temp:String = currentLabel;

while(currentLabel == temp && currentFrame < totalFrames) {
nextFrame();
}
stop();
if(currentFrame == totalFrames) {
gotoAndStop(1);
}
trace(currentLabel);
trace(currentFrame);
}


/*back up one frame from current label (to end of last bullet point)
uses key_up event, want to use UP arrow*/

function prevFrameLabel(whichEvent:Event):void {
var startLabel:String = this.currentLabel;
while (currentLabel == startLabel) {
prevFrame();
if (currentFrame == 1) {
break;
}
}
trace(currentLabel);
trace(currentFrame);
}


Thanks much,
WP

View Replies !    View Related
Keycodes And "if" Statements And Operators, Oh My
I need to create a rather advanced "if" statement.

It has to do with keycodes. On keyup I want the script to advance, but only if a number key is pressed. In a nutshell it will work like this. If you hit a key, Flash will check if it's a number by seeing if it falls in the range of allowable keycodes, if it is then the script advances. The keycodes for the regular keyboard numbers start at 48 and end at 57. The keypad number codes start at 96 and go to 105.

My very rough guess looks something like this:

onClipEvent (keyUp) {
if (Key.getCode() is between 48 and 57 or 96 and 105) {
then advance the script
yadda...
yadda...
yadda...
}
}

The trouble is I have no idea how to create this seemingly simple line of code. Would anybody be so good as to help me with it?

Thanks in advance,

Jason

View Replies !    View Related
Problem In Running A Flash MX-2004 Application On Windows 98 Adn Windows NT.
Hi all
I have this problem ......here it goes.....
Actually I developed a Flash MX-2004 application which has to run on both mac and windows platforms.
This application does the funciton of a dictionary and has 46 xml files and close to 13000 sound files.
This application runs fine on most Windows platform, however it doesnt work on Windows 98 and Windows NT where though the intro animation comes & the home screen loads....the application part of the program doesnt load.

Why is this so??? I am totally clueless...please help....
Do I have to make the intro and exit animations as separate swf files adn call them????
Please help....

View Replies !    View Related
Flash Popup Adverts/windows That Aren't Windows
Hi there

Just wondering if anyone knows any links to tutorials to make those flash adverts you find on websites? They are actual popup windows but flash boxes that appear above a webpage.

I think they use div layers as well as some flash? But im not sure where to find a tutorial!

For an example visit:

http://www.channel4.com/4car/news/index.jsp

(you might need to click on several pages down the left to get one to appear)

Any help on this would be a great help.

Thanks

View Replies !    View Related
Is It Possible To Make Windows Icons For Windows Xp With Flash Mx?
I have gotten bored of the simple icons that you automaticly get... and I wondered if its possible to make my own! Is it?

View Replies !    View Related
How To Create 'Windows' Windows With Flash?
I'd like to create a windows system like the one we use on windows. This is what i really like:
Yo have some buttons. When u click on any of 'em a popup window opens (inside could be text, image or movieclips or all of 'em). Last window it opens always shows up on top and if u select one that it's behind this comes automaticly to the top. I'd love too if u could minimize 'em and also if eacho one opens into a new swf.
There is a example of what I want here:
http://senocular.com/flash/source.php?id=0.49
But in that example everything is in the same swf, and as I said some lines before I want each window to open into another swf.

...........hope u can help me. Thanks!

View Replies !    View Related
Windows Emulator.... Having Trouble With Minimizing The "windows".
I'm creating a website that will behave kinda' like Windows. I have a basic menu that when you click on an option, a window will open up. You can drag the windows and close them. However, I'm having trouble with the minimizing part.

Lets say that I have 3 "windows" (each is a movie clip) called "win1", "win2", and "win3". Each window has an instance of a minimize button. When you click the button, the window should minimize to the bottom of the screen, and line up in the order that it was minimized in (just like Windows). I figured out how to get them to minimize, but I can't get them to sort themselves correctly.

Lets say that I just minimized all three windows in this order:
win1, win2, win3

Now, if I click on win1 to maximize it, I want win2 and win3 to shift over to the left to take the place of win1. Then, if I minimize win1 again, it should go to the end of the row. Resulting in this order:
win2, win3, win1

Does anyone know of any code that I could make these windows sort themselves when they are minimized and maximized?

Thanks!
Lee

View Replies !    View Related
Interesting Issue With Flash And Windows - Flash Start With Windows?
Hey guys,
I'm programming a flash application that would run on a user's desktop (using MDM or similar programs to convert to a transparent background EXE).
My client would like to have the users select weather they want to application to start with windows or not. I would like to know how to make my flash application start with Windows without manually adding it (the users won't have to add it to the startup folder themselves). Can flash write to the registry? Can a third party program do it for me? The client wanted to EXE to run without an installation. Thank you very much!
Yuval Karmi

View Replies !    View Related
New Windows And Dragabel Windows
Right im new to flash and i need to know how to create a new window inside flash and how to make them dragable

View Replies !    View Related
Windows To Mac To Windows Problem
I'm a Mac user and I'm working on a large project with a client who is using Windows XP. My client is creating some Flash content in Windows and then sending the .swfs to me to incorporate into the site.

These files play fine on my computer. I upload them to my web server and my Windows-based clients are able to view them over the web. However, if I email the .swfs back to my client, they won't run on the Windows computer. This is a problem, since it's my client who will ultimately be hosting the site.

There is no problem with .swfs that I publish on my computer and then email to my client.

Any ideas?

View Replies !    View Related
Launching Flash Windows From Flash Windows
Please can someone help me.

I am trying to create my own personal portfolio on cd. The main interface is a swf and contains a list of buttons (which are the titles of my work). When these buttons are pressed I want to launch a new flash window ontop of the existing one containing the piece of work.

I have looked at javascript popup windows using dreamweaver but have had no luck. I don't know whether this is because you have to use http's or that im thick and have no knowledge of javascript.

If anyone can help me I would greatly appreciate it. I am using Flash MX if it makes a difference. If the solution is using javascript or html can please explain it to me like a 5 year old because I don't know what im doing.

Cheers
Cokey

View Replies !    View Related
Launching Flash Windows From Flash Windows
Please can someone help me.

I am trying to create my own personal portfolio on cd. The main interface is a swf and contains a list of buttons (which are the titles of my work). When these buttons are pressed I want to launch a new flash window ontop of the existing one containing the piece of work.

I have looked at javascript popup windows using dreamweaver but have had no luck. I don't know whether this is because you have to use http's or that im thick and have no knowledge of javascript.

If anyone can help me I would greatly appreciate it. I am using Flash MX if it makes a difference. If the solution is using javascript or html can please explain it to me like a 5 year old because I don't know what im doing.

Cheers
Cokey

p.s The new window needs to be a fixed size with no scrollbars, back buttons etc. Just the window.

View Replies !    View Related
Loading Flash Windows Projector From Another Flash Windows Projector
I am trying to make the button in my movie load another movie, but I am playing the flash in windows projector, is it posable that you can load a flash windows projector from windows projector, I tried it and had trouble, here is what I had for the action script:

Movie 1 button action script:


on (release) {
loadMovieNum("Movie 2.exe", 0);
}


When I had it as Movie 2.swf it works fine, is it possable to make a .exe to work?

View Replies !    View Related
New Windows
I need to open a new window (800x80pxl) at the frame 2, just below the one is showing, can anyone tell me how to do it?

View Replies !    View Related
POP UP WINDOWS ?
HOW DO YOU ADD THE PROPERTIES OF A POP UP WINDOW ONTO A BUTTON. IN OTHER WORDS IF I WANT A BUTTON TO POP UP A SPECIFIC SIZE HTML POP UP HOW DO I DO THAT?
THANKS!

View Replies !    View Related
Pop Up Windows
how could i do this

<ONCLICK="window.open('http://www.angelfire.com/ok3/Squall/medRandy2.jpg', 'Sample', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no,resizable=yes,copyhistory= yes,width=330,height=220')">

using flash... i have the small thumbnail picture and all that on flash, but how do i add this code? i dont want the pop up to be in flash i just want it in html..
thanks for your help

View Replies !    View Related
Help In Pop Up Windows
I am looking to find a tutorial in pop up window that come up in a separte window than the main page,.. HELP PLEASE

View Replies !    View Related
Pop Up Windows
Hi everybody,
I'm going crazy trying to understand how to make this "simple thing" possible.

I have to open, at button release, a new browser
window, with a certain size, without status bar,
with a certain content and so on.

In Html there's no problem at all there's thousand's of javacode for this.
The problems start with flash:
I can use geturl but How I can directly tell the browser
to open a window with the desired dimensions?
For the moment I can open a blak window with the javacode
that opens a third window (the one I desire).
Not so elegant don't you think?

Thanks in advance

View Replies !    View Related
Windows Xp
does any one know how to fix the problem of load movie comeing up behind a standalone player in windows xp and I think it does it in windows me also.

View Replies !    View Related
Pop Up Windows
I have been working on updating a website I did about 6 months ago. The client wants to have pop up windows of some of the tattoos that don't show up very well at a max hieght or width of 300 pixels. Doing the pop up is no problem. The problem is that I don't know how to set the size of the pop up window in Flash. I don't want a whole new page to open and have a bunch of empty space around the image. If someone could fill me in on the code for Flash 4, or 5, I would appreciate it. The whole site is in Flash and need to have this functionality in Flash. If you want to check it out, its http://www.alienartstattoo.com

It works best on broadband connections.


thanks for any and all help

View Replies !    View Related
Pop Up Windows
on http://www.3rdillusion.com/ how do you do the cool popup thing where it says launch 3i chromless, or the fullscreen one??

View Replies !    View Related
Pop-up Windows
Hi. I need a little help with Pop-up windows. Here's my situation - I am running my website from one main html document, loading my movie from there. Each section of my website is simply just loaded and unloaded movie clips. Now... In my portfolio section...I call up a movie into level 2 which basically just displays my thumbnails. I want to set up the links so that the thumbnails will open individual little pop-up windows. Now I have tested the pop-up code on my root movie. It works. But it wont work on the loaded movie which is sitting on level 2. Is that my problem - You can only do it from the root level 0? Is it a publishing problem?

Thanx,
Doug

View Replies !    View Related
Pop Up Windows
ANy idea how to coordinate pop ups?? I mean I want to open a new window on the right side of the page.

can you guys help???

J

View Replies !    View Related
Pop Up Windows
ok.....im wanting to create a few pop windows from my flash movie, im using javascript and i dont want to use smart clips...What im currently using doesnt seem to be working can to firgure out what ive done wrong..

In the html i have this code in the header..

<SCRIPT language=javascript type=text/javascript>
<!--

var win = null;
function NewWindow(mypage,myname,w,h,scroll,resize){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left ='+LeftPosition+',scrollbars='+scroll+',resizable= '+resize
if(win&&!win.closed)win.close()
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}
//-->
</SCRIPT>

And the script i have on my button in flas is...

on (release) {
getURL ("http://www.flashkit.com", "NewWindow(this.href,'name','425','430','no','no') ;return false");
}

what have i done wrong

hope u can help

View Replies !    View Related
Pop Up Windows
i have a few links in the gallery section on my flash movie.
on clicking these links i want a new window to open up with the related htm page.
however i want the scripting in such a way that...
a new browser window(say window "x") should open the first time i click on any link(say link "x") on the gallery section.
but when i click on any second link(say link "y") in the gallery section then it should not open a new browser window - rather it should refresh the previous previous browser window "x" to window "y" with the item related to link "y" now being displayed.
can anyone plz help with this bit of scripting.

View Replies !    View Related
Pop Up Windows
i know this has probably been asked a million times but seeing how my modem is really slow it takes me for ever to look up something so i figured this would be faster.. how do you make a button in flash that when clicked will open up a pop up html file....? if you no the link to the demo just give that to me thanks

View Replies !    View Related
WINDOWS
Hi, Is there a way of copying a window and creating multiple windows with different text within each?

View Replies !    View Related
Pop Up Windows
I would like to make a pop up window containing my flash movie. The source html file would contain zero flash and the pop up window would contain flash with no internet bars just the window, ive see it done at http://www.tiffany.com if anyone can help I would be thankful, thanks leo.

View Replies !    View Related
Pop Up Windows
How do you creat pop up windows in Flash MX? I have tried and tried, but it always shows an error. What's the script tag?

Thanks

View Replies !    View Related
Windows
how can make your flash movie have the effect that something was drawn into place. I mean, while the flash movie is playing. there are millions of examples, i wanted to know if this was action script, or motion tweening?

View Replies !    View Related
Pop Up Windows
Hey yall....... Im trying to make a pop up html window from within Flash and I´m not having much luck. Any genious Flahs dudes out there willing to lend a hand?

View Replies !    View Related
Pop-up Windows?
hey...

i've got a pretty simple question i suppose!

i've got my whole site made in flash, and when the movie starts that is the "homepage", i want to have a pop-up window appear that displays another .swf file with a list of new updates, etc...(ya get me?)...in the tutorials i've read, it says to attach the coding required to a button, but I don't want this, i just want the pop-up window to appear as soon as the "homepage" movie starts!!!

but.........i don't know the coding required, etc...what do i need?

thanks for any help!

View Replies !    View Related
Get URL 2 Windows On MAC OSX
I just recently updated to MX. I have just noticed when I look at my site on MAC OSX two windows open when I click on a button that is "getting a URL." This is suppose to load a movie in a new window but on OSX it is opening the movie in one window and a blank page behind it...on top of my site. I don't want to change the settings because it is working on all other systems....

Just wondering if anyone else has had this problem.?

please advise,

View Replies !    View Related
Pop - Up Windows
I hope I ask this question properly. Here goes. When someone types in a url, how do I attach a full screen pop - up window to it?

View Replies !    View Related
Pop Up Windows
I found on another post in here a while ago some code someone said to put into you on(release) stmt. This is what I have :
on (release) {
getURL ("javascript:NewWindow=window.open('http://www.neutechnet.com/images/boatfeature-350.jpg','newWin','width=430,height=330,left=0,top =0,toolbar=No,location=No,scrollbars=No,status=No, resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}

This doesnt show the image. The window pops up with this is the address bar:

javascript:NewWindow=window.open('http://www.neutechnet.com/images/boatfeature-350.jpg'

The Java Script Error box does come up and say something about expecting '('... What in the world ??? Does anyone know what this means??? TIA

View Replies !    View Related
Windows?
hey!!

does anyone know how to open a FLASH window(not browser by get URL)...likein http://www.fashionshot.net //
pls help a felow brother!!

thanks in advance!!

View Replies !    View Related
POP UP Windows On A CD
Hi

Does anyone know what code I have to use to create a popup window work from a CD.

I know you have to create a button, once that is clicked how does it open a new window.

GetURL works on the web but not on CD's

Adios
Pedros

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved