The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsHmm.. ok.. i suck at action script and would like something like this working:
When key (the key i want to be pressed) is pressed, go to bla bla bla!
When key (The key that was pressed) as been released, go to bla bla bla!
Could sum1 help me? plz? if not just dont reply.. no need to tell me i suck or stuff like that..
Try using a combination of if and else statements.
onClipEvent (enterFrame) {
if (Key.isDown (Key.INSERTKEYHERE)) {
gotoAndPlay ("blah");
}else{
gotoAndPlay ("anotherblah");
}
}
postcount +=1;
Newgrounds Photoshop Headquarters || Don't use MS Paint! Use Aviary!
SING US A SING YOU'RE THE PIANO MAN
At 6/23/07 10:16 PM, Doritos3440 wrote: Hmm.. ok.. i suck at action script and would like something like this working:
When key (the key i want to be pressed) is pressed, go to bla bla bla!
When key (The key that was pressed) as been released, go to bla bla bla!
Could sum1 help me? plz? if not just dont reply.. no need to tell me i suck or stuff like that..
if(Key.isDown(Keycode)){
action;
} else {
action;
}
Might work, but i'm pretty shitty AS myself - give it a try
on (press) {
gotoAndStop (that one frame)
}
on (release) {
gotoandStop (that one other frame)
}
if its a click button.
o i didnt read the full thing, umm ya just listen too what they said i was talking about something else.
im trying to make a game.. and i made a movie clip with all the hero move.. and i made the starting animation of the hero and after it on "doing nothing" with action script stop(); and i wanted to make it so when sum1 press like.. "A" it go to the part of the action where it attack.. dont know if you understand..
At 6/23/07 10:20 PM, ChilliDog wrote: What do you mean "go to blah blah blah"
What do you want to happen when those Keys are pressed?
An object moves? It goes to a different part of your movie?
Noo idea what you're trying to accomplish.
Also, might I suggest looking here first AS: Main
(forgot to put the guys post at top of my last reply..)
im trying to make a game.. and i made a movie clip with all the hero move.. and i made the starting animation of the hero and after it on "doing nothing" with action script stop(); and i wanted to make it so when sum1 press like.. "A" it go to the part of the action where it attack.. dont know if you understand..
Hmm.. i tried to use the action script that you guys said but.. im having some trouble making them working.. look.. my Action Script Skillz Level are lik to.. "As good as a Blind Retarded Kids".. geez.. i would rly like to make that game!
Alrighty then, let's try this for your character.
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
this.gotoAndPlay("attack");
}
So, when you press the A button (65) your character movie clip will play the attack animation.
And add this...
onClipEvent (keyUp) {
this.gotoAndStop("standing");
}
so that when you let go of the A button the animation will stop.
This is just one, simple way of doing this.
Also, make sure that your attack animation loops so like if the beginning frame of the attack animation is labeled "attack" then, on the last frame of the animation put this code
gotoAndPlay("attack");
So it will loop until told to do otherwise.
Good luck! Hope this helps, post any questions here or PM me or w/e.
AS: Main
Don't read this sentence.
At 6/23/07 10:44 PM, Doritos3440 wrote: i wanted to make it so when sum1 press like.. "A" it go to the part of the action where it attack.. dont know if you understand..
Just make a movie clip that contains two frames, one with your character standing and one with your character attacking. Then, just use the code I had written earlier:
onClipEvent (enterFrame) {
if (Key.isDown (65)) {
//because Flash doesn't recognize 'Key.A', you must use Flash keycodes instead.
gotoAndPlay (attackingframe);
}else{
gotoAndPlay (standingframe;
}
}
Look here for the rest of the keycodes you can use.
postcount +=1;
Newgrounds Photoshop Headquarters || Don't use MS Paint! Use Aviary!
SING US A SING YOU'RE THE PIANO MAN
Or you can save time and use this: http://img257.imageshack.us/my.php?image=keyg etter0mh.swf
At 6/23/07 11:32 PM, Diki wrote: Or you can save time and use this: http://img257.imageshack.us/my.php?image=keyg etter0mh.swf
I cant see it..
At 6/23/07 11:32 PM, Diki wrote: Or you can save time and use this: http://img257.imageshack.us/my.php?image=keyg etter0mh.swf
Hey that's pretty cool, thanks it will definitely come in handy.
If you couldn't see it it was a program that shows the number for whatever key you press like a-65 and such. Very handy.
AS: Main
Don't read this sentence.
hmm.. well.. still got difficutly making it work.. -_-