The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:37 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 7 posts ] 
[Request] From Walk to Run 
Author Message
User avatar

Joined: Tue Aug 12, 2008 2:07 pm
Posts: 39
how would i code a way to have it so that if you press the left or right key twice in a certain amount of time it will gotoAndStop the running frame but if you only press left or right once it will gotoAndStop the walking frame

_________________
get free wii points here!


Thu Sep 24, 2009 5:26 pm
User avatar

Joined: Fri Mar 27, 2009 8:55 pm
Posts: 282
Location: Why do you want to know you perv!
Gender: Male
Skype: lomeli1241
Currently Playing: Kingdom Hearts Re:Coded (JP)
I've been having the same problem, but instead of/along with changing frames, mine needs to change speed. What code are you using? I'm using X2i's code for platform games.

_________________
Image
Image
Give cred 2 Doromac
Mes Amis: show
BICURIOUS GEORGE
daniel
King Master X12
Neo_Fire_Sonic
Racerx52
Sora
Tycron
Tyli
User Avatar
yoh
Envoyez-moi un message pour ĂȘtre mon ami! Ha! That's French 4 Pm to be Friends


Thu Sep 24, 2009 7:37 pm
WWW
User avatar

Joined: Mon Aug 11, 2008 1:09 pm
Posts: 166
Location: England lol
Gender: Male
Currently Playing: Minecraft
You could use a timer between keypresses, eg check if a key has been pressed twice in a set time limit. Or using keyframes, do a check for the keypresses on two separate frames so that if the user presses it right it will work... if you really need code I'll see what I can do.


Thu Sep 24, 2009 9:48 pm
WWW
User avatar

Joined: Tue Aug 12, 2008 2:07 pm
Posts: 39
x2i wrote:
You could use a timer between keypresses, eg check if a key has been pressed twice in a set time limit. Or using keyframes, do a check for the keypresses on two separate frames so that if the user presses it right it will work... if you really need code I'll see what I can do.

I don't know how to check if a button is pressed twice and I'm not exactly sure what kind of timer you are talking about, but i do know how to make timers
and it would be nice if you could put the code, but if you could explain how to code it you can do that also
whichever would be easier

_________________
get free wii points here!


Fri Sep 25, 2009 4:03 pm

Joined: Wed Nov 26, 2008 10:43 am
Posts: 16
x2i wrote:
You could use a timer between keypresses, eg check if a key has been pressed twice in a set time limit. Or using keyframes, do a check for the keypresses on two separate frames so that if the user presses it right it will work... if you really need code I'll see what I can do.


Can you show an example code. Like a timer code, you start walking then running. Because i can use friction to make a good movement set.


Sat Dec 05, 2009 5:14 pm
User avatar

Joined: Mon Jul 06, 2009 11:54 am
Posts: 57
Gender: Male
Ahhhh yes my friend you see i couldn't figure this out either until i looked at a tutorial on youtube!
I really can't explain all of it in this one post so i will post my own tutorial in this section to help you ^_^ and if it still doesn't work i will even provide a flash file!

_________________
Best Website's For Mugen Characters
http://www.mugencharacters.ucoz.com
& http://mugeninvasion.ucoz.com/load/3-1-0-6
ImageImageImage
My Youtube: http://www.youtube.com/reashun14
I PLAY COMBAT ARMS ONLINE!
Image


Mon Apr 05, 2010 1:35 am
WWW
User avatar

Joined: Tue Aug 12, 2008 2:07 pm
Posts: 39
thanks

_________________
get free wii points here!


Wed Apr 14, 2010 1:48 pm
Display posts from previous:  Sort by  
 [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.