Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsA)#(#"HT#(Hiejigeiogwejigejiojigo4joig43 3g4j843g89g439j83g4j89g43j89g43j9ig4jio3 jig4o
huh
sry for that
is there ANY way to get simple "single key press" in flash
lets say user clicks and holds SPACE i just want that something happens once, not whole time he is holding space
I'm SURE there's a better/earier way, but I'm not a great programmer. What you could do is have it set a variable to "1" when it is pushed, and then "0" on release. Then only have the action run if the var is 0. Does that makes sense?
I suck at this AS stuff, sorry. Just an idea. I bet someone else will come along to help better. :)
I haven't tried this method yet, but I think it should work (just put it into a movieclip):
onClipEvent(load) {
urrh = true; // Just a random variable name.
}
onClipEvent(enterFrame) {
if(Key.isDown(Key.SPACE) && urrh) {
urrh = false;
// Whatever function you want to trigger or variable you want to change.
} else if(!Key.isDown(Key.SPACE)) {
urrh = true;
}
}
I think this should work.
(!Key.isDown(Key.SPACE))
i think thats part i was missing whole time because i didnt know about it!!
this might work now, thx a bunch
At 10/16/09 04:47 PM, Lidve wrote: (!Key.isDown(Key.SPACE))
i think thats part i was missing whole time because i didnt know about it!!
this might work now, thx a bunch
Ah, that exclamation mark only says "When this is false".
So basically !Key.isDown(Key.SPACE) can be translated to When SPACE is NOT down.
itt wooooookkrkkssss so far amaaazing "!!!
thanks and sorry for wild behaviour i am so happy because i was so frustrated whole time trying to figure simple method
At 10/16/09 04:53 PM, Lidve wrote: itt wooooookkrkkssss so far amaaazing "!!!
thanks and sorry for wild behaviour i am so happy because i was so frustrated whole time trying to figure simple method
No problem. Just ask if you want any more help.