[F8] Letter Keys
I know if i have a button and i type on (keyPress "<w>") It will act on the key w but when i have a movieclip...
onClipEvent(enterFrame){ if (Key.isDown (Key.w)) _root.player._rotation=_root.player._rotation-5 }
It doesn't work How do i get player to rotate on the key w in a movieclip
FlashKit > Flash Help > Flash Newbies
Posted on: 08-05-2007, 10:00 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Letter Keys?
how do i make flash recognize when the letter keys are pressed?
Using The Letter Keys (A,G,L Stuff Like That)
I'm making a game but for some reason all I can use are keys like CONTROL, CAPSLOCK, TAB and all those program buttons. How do I use the letter keys
Heres tha code I'm using
Quote:
onClipEvent (load) {
var fight = false;
}
onClipEvent (enterFrame) {
if (fight == false) {
//codes for movement
if (Key.isDown(Key.getCode("83"))) {
_x += 10;
_xscale = 95;
}
if (Key.isDown(Key.getCode(65)))
_x -= 10;
_xscale = -95;
}
//codes for actions
if (Key.isDown(Key.CONTROL)) {
gotoAndStop(2);
//punch frame
fight = true;
} else if (Key.isDown(Key.SHIFT)) {
gotoAndStop(3);
//kick frame
fight = true;
} else {
fight = false;
}
}
I thought this was right
Quote:
(Key.isDown(Key.getCode("83")))
but my character still won't move
Listening For Letter-keys
Hey,
I'm trying to get my program to listen for when the user presses a "letter" button. The problem is I can't get flash to listen for most of the letter-keys("d" and "u" seems to work fine though ) This is the code I have so far..:
ActionScript Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
function keyDownFunction(event:KeyboardEvent) {
trace(event.charCode);
if (event.charCode == 105) {
var newtext:TextField = new TextField;
newtext.text = "this is your inventory";
addChild(newtext);
}
}
When I replace the 105(which I think is the keycode for lowercase "i") with 32 for spacebar, it works just fine. Can anyone help me with this?
Thanks in advance!
Letter Keys In Actionscript
Ive noticed that there is no option to have letter keys for the script:
if(key.isDown(Key.___)
But i have seen that there is a way to put them using numbers like 87 or something but i cant remember where i saw that. Does anyone know the list of numbers that correspond to each letter? Thanks.
P.S. Yea i noticed i post alot of threads too. =D
Moving With Letter Keys?
Hi!
I need help with controling a movie clip with the letters on the keyboard.
I have tried with this one:
If (Key.isDown(Key.A))
But it doesn't seem to work .
Racing Game - Please Help How Do You Change The Controls Of The Car To Letter Keys?
Racing game - Please Help! How do you change the controls of the car to letter keys like w is accelorate and s is slow down - etc. Right now the controls are in a bad place and i cant chage them to letter keys. Here are the game files: http://www.1matthew.com/flash/racesummer.rar . The game is posted at: http://www.1matthew.com/flash/racesummer.swf I'm still building the game. the actionscript for the blue car is:
onClipEvent (enterFrame) {
// make the car go forward
if (Key.isDown(Key.HOME)) {
speed += .5;
}
// make the car go backwards
if (Key.isDown(Key.END)) {
speed -= 1;
}
// tells the car to slow down after the speed of 20
if (Math.abs(speed)>6) {
speed *= .7;
}
// you can change the rotation of the car to your desire
if (Key.isDown(Key.DELETEKEY)) {
_rotation -= 5;
}
if (Key.isDown(Key.PGDN)) {
_rotation += 5;
}
// here is where the hittest is for the boundary
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.land.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
}
Textfield:OnChange - Random Letter Settles On Entered Letter - Impossible?
Hey guys, is this possible?
I've got an inputfield.
OnChange Event Handler.
When someone types a letter, i want the letter to become 0, then 1, then 2, and so on until 9 and then i want the letter to be there.
And when they click on another letter, same effect happens.
so at the end if i typed, "testing", each letter scrolls 0-9 like a roll dial and settles on the letter typed.
What i've managed to do is make it work, but if i type at normal speed and not slow, i end up getting something like:
t32t43g
any ideas?!
Animated Text - Writing Letter By Letter
Help! I need to write a simple flash animation that will 'write' the words Admiral Inn on the screen (in a script font) so it appears as if some invisible hand is writing it. Does anyone know how to easily do this?
thanx.
Fading Text In Letter By Letter With Actionscript?
Hi people!
Does anybody know if it is possible to animate text via actionscript.
For example, I would like to do that good old favourite of having text fade in letter by letter.
However, breaking apart every letter and indivdually fading them in one after the other not only takes a hell of a long time, but also (with large pieces of text) would cause huge file sizes.
I thought of masking, but I can't seem to get a soft edge on the mask to enable me to make it look like it is fading in.
Sooo.....
Does anybody know how to do this via actionscript,
OR...
Does anybody know how to get the soft edge on a mask to be able to create a similar effect.
Hope you can help
Cheers
Deadhands
Making Text Appear Letter By Letter?
Hi
I'm new to the world of Flash, so I hope this question isn't too 'easy' or complex!
BAsically what I want to do is to have some text appear (or fade in) letter by letter; but without chaning size, colour, shape, position etc...
Is there some piece of code that will let me do this? I know I can achieve this effect using loads of masks, but i don't really want to have to do that with each individual letter!
Any hel[p would be great, thanks!
PS. Think of the telewriter on BBC Grandstand; that sort of effect
Simple Letter After Letter Effect.
I was wondering is there any simple way or anyone know of a script that will take a string like "Hello my name is" and out put it like chater after charter like a type wrighter? so like H pause e Pause l Pause? I dont want ot maek clips for every setnece does anyone have any idea?
Thanks
Words Slide In Letter By Letter
hi. i saw this effect on some sites where the words slide in word by word making a pretty cool effect.
is it a frame by frame animation or is it done using actionscript?
thanks in advance
Text Effect - Letter By Letter
I´m looking for a text effect that loads the text thru xml, the text appears letter by letter, coming from and _x and _y making a trail of letters and forming the phrase.
Does anybody knows how to do it or a post about an effect like this?
Make Text Appear Letter By Letter
Does anyone have code, or know of a tutorial, for doing this?
Sorry for asking such a non-specific question. I want to do it but I don't know where to start.
Thank you!
Text Appears Letter By Letter
Does anyone have code or a link to a tutorial or site illustrating how to do this?
Sorry for such a non-specific question. I did a search that turned up nothing. Mostly I'm seeing stuff about horizontal scrolling text.
Thanks!
EDIT: This is the second posting of this, sorry. Oddly, the first I saw the original was RIGHT AFTER I POSTED THE SECOND ONE. Anyone have any idea what causes that? Or am I going crazy? Probably the latter.
Words Slide In Letter By Letter
hi. i saw this effect on some sites where the words slide in word by word making a pretty cool effect.
is it a frame by frame animation or is it done using actionscript?
thanks in advance
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.
Text Letter By Letter
Could anyone tell me please how to get text on movie letter by letter
Thanks in advance
Delete Letter By Letter
I have a dynamic text field with some text for example "Hello". Previously I used this code to get typewritter effect:
Code:
typeText = "Hello";
typeInterval = setInterval(typeThis, 70, typeText);
counter = 0;
function typeThis(thisString) {
preloading_txt.text += thisString.charAt(counter);
counter++;
if (preloading_txt.text == typeText) {
{
clearInterval(typeInterval);
}
}
};
Now I would like to delete text from my dynamic text letter by letter.
How could I do that?
Text Letter By Letter?
Just wondering if anyone knows how to get text written in a text box letter by letter so it looks like it's being typed??????
Thanks! Dave.
Letter By Letter Text
okay, i've seen all these flash intros using text that comes in letter by letter then it leaves letter by letter instead of the whole word coming in or out
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!
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
Getting Letter
i want my letter s to fade in roughly 30 frames from black to red, and id rather not use actionscript(seeing that i know 0 about it).
thank you thank you thank you
-matt
Some Letter
New difficultier prolem
I´m trying to make "game" where program give you some random letter and case you push it right you get congratulations text. If you push wrong, it gives you another letter. Can someone give me few tips?
Henkkaz
Only The First Letter
I'm using this code to load a external txt file into a dynamic text box
loadVariables("myLinks.txt",0);
I've turned the little '<>' html tags enable button on
problem is that this code:
&placeyear014=Leeuwarden<br>Nederland<br>2002<br>A be Bonnema
comes out as
L
N
2
A
Thus only the first letter on the row.... it does use <br> apparently
What is wrong here?
Letter Key
i have a problem i need to know how to assighn a letter key to go to a certien frame
3d Letter Spin
I am trying to make a 3d letter (G) spin 360 degrees, and I can't figure out how to do this in flash. So, i created it in swift 3d and works perfectly, except it adds 500kb to the file size, way too much! Does anyone know any alternative methods that wouldn't take forever to do?
I appreciate all help, thanks
Editing A Letter
I have created a flash that helps write apology letters. It is at http://reteaming.com/responsibility
You type in answers to questions and using your answer the program designes the letter for you. It's all quite straght forward, mostly input text, set variable, and print. Now I would like to give the user the option of editing the letter before he prints it but I haven't got the faintest idea of how to do that. I need an input field with the text of the letter (I have it as one variable) there already waiting to be edited and to be saved before printing.
Any ideas?
Letter Count
can i set a movie counting no. of letters in inputing text by users?
One Letter At One Press?
Hi,
I have this simple Hangman-type game.
-first there are several empty text-boxes and a picture, player tries to quess the word by pressing letters on the bottom of the screen.
-when player presses letter-buttons and if letter excists in "word", the letter is written in to corresponding empty text-box.
...right. this works.
But if there is two (or more) same letters in the word
(Like 2 times letter"p" in the word "rapper")
How can I make the code to fill only one text-box, and on the next press of the same button fill the other one. ...and then make the button invisible.
Here is the button code...
Thanks for your help, its really appreciated!
Quote:
on (release) {
_root.letterU._visible = false;
for (var i = 0, z = 0, y = 0; i<_root.lengthWord; i++) {
a = (theLetters[i]);
b = "u";
c = "U";
if (a == b) {
if (i == 0) {
_root.box1.text = c;
y = 1;
_root.kirjaimia++;
trace(_root.kirjaimia);
_root.playClick();
} else if (i == 1) {
_root.box2.text = c;
y = 1;
_root.kirjaimia++;
trace(_root.kirjaimia);
_root.playClick();
} else if (i == 2) {
_root.box3.text = c;
y = 1;
_root.kirjaimia++;
trace(_root.kirjaimia);
_root.playClick();
} else if (i == 3) {
_root.box4.text = c;
y = 1;
_root.kirjaimia++;
trace(_root.kirjaimia);
_root.playClick();
} else {
z = 1;
}
}
if (z == 1 && y != 1) {
_root.playWrong();
}
_root.CheckWinLose();
}
Inputing Letter
how can i ensure all the input letter is Capital letter, what is the script
Letter Typing
Is there an easy way to make the letters look like they are appearing as they are typed?
Right now I am using a keyframe for each letter. I would think that there is a diffrent way.
To see what I am talking about. go to:
http://wwwnomold.com/dvd.html
look at the words when they appear in the top right.
I am in the very early stages of making the screen so a lot is not done yet.
thanks for any help!!!
ID3 Only Displaying First Letter
I am using ID3 to get the title of a song, and i know the title is there, but it only outputs the first letter of each word in title
ex: Title is Sucker Train Blues
flash shows S T B
any help is appreciated...thanks
Letter Button
how do I make it to where I have a button and if you press "H" or another letter it makes the button perform the action you want it to?
for instance, I am trying:
on (keyPress "<h>") {
gotoAndStop(1);
}
and there will be an error.
Random Letter
is there a quick easy way to get flash to give a random letter, like every time you press a button variable "letter" gets a value of one of the 26 letters from the alphabet.
Flash For E-Letter?
Hello all... pretty new to Flash, although I've created a couple (pretty standard) web banners, and gone through a few tutorials. I'm also fluent in the standard "for-print" apps, i.e. Illustrator, Photoshop, InDesign, Quark, etc. I've dabbled in Director, enough to see similarities between it and Flash.
Anyway, enough about me. I've been assigned the task of researching "e-letters", and how to create them. Does it make sense to use Flash for this? When I say e-letter, I mean sending out email that has animation, hyperlinks, etc. I've heard that html is used to do this, but I'm in over my head, so any help regarding how to use Flash to do this, or any other method, is greatly appreciated!
I'm sure I'll be using these newbie forums a lot in the coming months, so thanks in advance!
First Letter ToUpperCase()
Hey, I know that when editing a string with Actionscript, there are such object methods as toUpperCase(), toLowerCase(), etc. But let's say I wanted to only bring the first letter of a string to the upper case, how would I go about doing that?
Thanks,
~ Pol
Letter To Number
I tried to convert letters to number like this:
a = 1
b = 2
c= 3
etc....
WHat I have wrote up so far and its not working as I thought it would.... HELP!
inp1 = "";
inp1 = strnumber.toLowerCase();
inp1 = strnumber.replace(rexp, " ")
for ( i=0; i < inp1.length; i++ ) {
switch(inp1.substr(i,1))
{
case "a" : inp1 = inp1 + "2"; break;
case "b" : inp1 = inp1 + "2"; break;
case "c" : inp1 = inp1 + "2"; break;
case "d" : inp1 = inp1 + "3"; break;
case "e" : inp1 = inp1 + "3"; break;
case "f" : inp1 = inp1 + "3"; break;
case "g" : inp1 = inp1 + "4"; break;
case "h" : inp1 = inp1 + "4"; break;
case "i" : inp1 = inp1 + "4"; break;
case "j" : inp1 = inp1 + "5"; break;
case "k" : inp1 = inp1 + "5"; break;
case "l" : inp1 = inp1 + "5"; break;
case "m" : inp1 = inp1 + "6"; break;
case "n" : inp1 = inp1 + "6"; break;
case "o" : inp1 = inp1 + "6"; break;
case "p" : inp1 = inp1 + "7"; break;
case "q" : inp1 = inp1 + "7"; break;
case "r" : inp1 = inp1 + "7"; break;
case "s" : inp1 = inp1 + "7"; break;
case "t" : inp1 = inp1 + "8"; break;
case "u" : inp1 = inp1 + "8"; break;
case "v" : inp1 = inp1 + "8"; break;
case "w" : inp1 = inp1 + "9"; break;
case "x" : inp1 = inp1 + "9"; break;
case "y" : inp1 = inp1 + "9"; break;
case "z" : inp1 = inp1 + "9"; break;
default: inp1 = inp1 + inp1.substr(i,1); break;
}
}
return(inp1);
}
Substitute Letter
I have a text box and when i press a button i want it to check for a SPACE in whatever they typed in the textbox. if there is one, change it to a _ (under score)
how is this done?
Letter Validation
Greetings all,
I have a variable that gets a value inputted from the keyboard at a different time to when this variable gets used.
What I want to check is if that value is from the alphabet only (uppercase or lowercase I don't mind). I can't use the "Key.getAscii();" command as the check isn't coming after someone has pressed their keyboard.
Thank you.
Filled In Letter A
Hello,
I'm a newbie but I've been at this for an hour on my stage the letters "a" are not filled in but when I test my movie or export it the "a" is always filled in. I don't know why. there are two a's both are part of a movie symbol.
thanks....
[F8] First Letter MUST Be Uppercase
Hi there!
Nowadays trend is to write everything in lowercase. Last Names, First Names, City Names, etc...
Maybe the use of computers is one of the reasons to such bad typing.
In a form, there's a lot of Input Fields to fill-in...
Is there a way in AS to make the first letter typed in an uppercase one?
I thank you in advance for the help you'll provide.
Best regards,
Gerry
Trim Last Letter
I know this is simple but how do I get the last letter of a string?
Get The First Letter Of A String?
The viewer enters text into my input box:
myInput = "apple";
If (myInput = first letter = "A") {
gotoAndPlay("apple");
}
If (myInput = first letter = "B") {
gotoAndPlay("banana");
}else{
}
????????
Random Letter
New to actionscript, The following is what I am using to select a
particular letter "a":
onClipEvent (load) {
go = true;
}
onClipEvent (enterFrame) {
if (go) {
x = random(122);
if ((x>=97) and (x<=122)) {
this.letter1 = chr(x);
}
if (x == 97) {
go = false;
}
I'm not sure how to script the opposite, so that a letter cycle will
exclude the letter "a" in the randomization result. I want a random letter to come up, not an assigned letter.
Thanks in advance for any help.
|