The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.34 / 5.00 31,296 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 10,082 Viewshey guys im trying to make an Rpg battle but im having this probelm, when i press the 'A' button it plays the movieclip continusly. like as though it's ment to make a character move EX: left and right like as though the button is ment to be held not pressed . i don't want this. I just want to simply press the button without having to worry about it play the movieclip constantly. and im no wizz on actionscript so
.-.-""" i was also wondering if i could get some help with the 'A' button being able to get pressed more than once. so i woun't have to worry about some glitches like my character disapearing randomly......sorry for the trouble guys.=(
At 1/7/10 01:13 AM, kawaiiminda wrote: hey guys im trying to make an Rpg battle but im having this probelm, when i press the 'A' button it plays the movieclip continusly. like as though it's ment to make a character move EX: left and right like as though the button is ment to be held not pressed . i don't want this. I just want to simply press the button without having to worry about it play the movieclip constantly. and im no wizz on actionscript so
.-.-""" i was also wondering if i could get some help with the 'A' button being able to get pressed more than once. so i woun't have to worry about some glitches like my character disapearing randomly......sorry for the trouble guys.=(
i have not really any idea of what you are talking about, but i'll try.
if(Aisdownorwhatever){
guy.play();
}else{
guy.stop();
}
that's my best try at a solution.
alright, here is a pseudocode
if ( A is pressed ) {
if ( moviclip._currentframe == 1 ) {
moviclip.play();
}
} im working on as2
oh sorry i forgot to put the code that i used.
Code:
onClipEvent(enterFrame){
if(Key.isDown(65)){// 66 is the letter "A"
_root.ProtomanBAT.gotoAndPlay(2);
this.gotoAndStop(1);
}
}
opps where it say 66 it's supose to be 65 sorry for the typo.
"I'm in love with UberCream." - Max Gilardi.
At 1/7/10 06:19 PM, kawaiiminda wrote: Code:
onClipEvent(enterFrame){
if(Key.isDown(65)){// 66 is the letter "A"
_root.ProtomanBAT.gotoAndPlay(2);
this.gotoAndStop(1);
}
}
if you don't want it to play constantly can't you just say gotoAndStop(2);
Also it could be better to use a listener for your key press events.
var oKeyListener:Object = {};
oKeyListener.onKeyDown = function():Void
{
var nKey:Number = Key.getCode();
switch (nKey)
{
case 65:
trace("A");
break;
}
};
Key.addListener(oKeyListener); thanks, but here's a link to my video so you can get a better understand. sorry im not that great in explaining things.
MegamanRpg
for some odd reason if you hold the A button it plays all of protomans frames.
i don't want that.
if your wondering Protoman is one MovieClip. even the enemy select thingy....same with the Boss.
this is what i did. the first time you press 'A'. the red polygon will come which is your enemy select thing.....
and the second time you press A protoman Attacks and the enemy select thing goes away.
however it doesn't seem to work out correctly. because if you hold the 'A' button it plays all of Protomans frames(remember he's one moiveclip). im trying to make the button avaliable only for a press, not a hold.
EX: while your typing you don't hold the letter do you? you press it. "L" because if you do hold the letter on your key board you get this "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL" sorry like i said im not great in explaining things but i hope it helps. thanks!
thanks for the code it seems to be funtioning lot more correctly now.
but i'll see what i can do about the minor glitches. this Rpg is imcompete by the way for those who seen the litte flash preview. thanks so much with the help. i ask a little more if i having anymore troubles.