Gamgam0
98 posts
|
Topic: Game Programming /
Flash Physics AS3
Originally posted by LifeKills:
to do diagonal movement you need a boolean flag for each arrow key(or WASD or whatever). in the KEY_DOWN event listener you set the flags to true if the buttons were pressed and in the KEY_UP event listener you set them to false again. then when you update movement you check to see which flags are true and apply the proper force. even if you press two at the same time it should recognize both of them
so like on the checkkeydown function I would have booleans like:
wkeypressed
akeypressed
skeypressed
dkeypressed
if I did that would I also have to have a key up function to make the booleans false?
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Flash Physics AS3
one last question what about diagnol movement. Like pressing the upkey and the right key at the same time?
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Flash Physics AS3
yea thats what I want for vAccel would it be this:
var vAccel:Number = 0; //v stands for verticle
//class code
//method header for key listener
if(e.keyCode== Keyboard.UP)
{
vAccel+=.5;
}
if(e.keyCode== Keyboard.DOWN)
{
vAccel-=.5;
}
//method header for enter frame
{
//inside enter frame method
character.x +=vAccel;
vAccell*=.95; //I added friction in there for you so. The higher the number
//the longer it takes to slow down by itself
}
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Flash Physics AS3
If i want it for verticle accelartion i just do the same thing but make it vAccel?
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Macromedia Flash 8 Professional help
yea it is but AS3 was introduced in CS3 but you can still use AS2
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Macromedia Flash 8 Professional help
You cannot make a game with AS3 in Macromedia Flash 8 professional. You need Flash CS3, Flash CS4 or the upcoming Flash CS5.
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Flash Physics AS3
How would I have acceleration/deaccerlation/velocity and all that kind of stuff instead of just something like:
if (e.keyCode == Keyboard.RIGHT){
character.x +=5;
}
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Make a password?!
Originally posted by aakash:
Originally posted by carmensandiago:
I think he’s copy-pasted it from something that was using it.
Well he is called Illegal.

lol
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Question about submitting game
is there a way to reset statistics?
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Question about submitting game
Actually now the highscores tab shows up with everything but it won’t register the highscores. Does it just take time?
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Question about submitting game
Hey i was just submitting my game and i was at the preview part of it. Is it normal to have no high scores tab when previewing even if you have high scores?
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
How to make save files more secure AS3
Is there a way to protect a flash save file. What i mean is there a way to make so the save file cannot be edited?
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Question about api AS3
Hey i was wondering to get the money bonus for having api in an as3 game do you need all the types of api (level sharing, making profile pics and high scores) For example if the only api you had on an as3 game was high scores wold u get the money bonus?
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Help! with ideling game(Solved)
Originally posted by Capucchi:
This site formats poorly. Both score and xp should be plusplus. Also make sure this is on the same line as the comment or itll be included in teh code.
use the “< pre >” and “< /pre >” tags without the spaces in between
to make it look like this
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Idle Game AS3 how to prevent cheating
How can you prevent cheating in an idle game people can not just get lvl 1000 with a .sol editor. Is there any way to prevent this is AS3.
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
Help! with ideling game(Solved)
var score;
var xp;
stop();
function onEnterFrame() {
score += 1()
root.scoreText.text = score
}
_root.bar.width = root.score
if(root.score = 100){
_root.score = 0
xp += 1;
}
|
|
|
Gamgam0
98 posts
|
|
|
|
Gamgam0
98 posts
|
Topic: Game Programming /
(SOLVED) Muting by pressing M key (AS3)
I was trying to mute sounds by pressing the m key in my game. For the m key to register I have to click the game. Then it works fine but on the next frame I have to click the screen and press m. How could I do this without having to click the screen every frame. Here is my code
var musicplaying;
var music:Sound = new mp3music();
var myChannel:SoundChannel = new SoundChannel();
stage.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDown);
function myKeyDown(e:KeyboardEvent):void{
if (e.keyCode == 77){
if(musicplaying == false){
myChannel = music.play(0,1000,null);
trace("music playing is true")
musicplaying = true;
return;
}
if(musicplaying == true){
myChannel.stop();
trace("music playing is false")
musicplaying = false;
return;
}
Why do I have to click the screen every frame so it can recognize the m key and how can I fix it
|