Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-05-2008, 11:08 PM   #1
Registered User
Join Date: Apr 2008
Posts: 11
Question "Duck" button

I want to put a "duck" or "crouch down" button (which will be spacebar) in one of my games. The only problem is that in one part of my script it says that if the character is standing still, it goes to the "Idle" frame, thus he cannot crouch, he HAS to be standing if he is motionless. How do I make it so he can crouch without "idle" getting in the way?
Elfman-rox is offline   Reply With Quote
Old 05-06-2008, 12:26 PM   #2
Senior Member
Join Date: May 2008
Posts: 174

If you post your code of his movement I might be able to help.
all I can think of is
ActionScript Code:
OnclipEvent(enterFrame) { if(Key.isdown(Key.SPACEBAR)) { gotoAndStop(insertframehere) } }

it should override the idle unless you have }else{
command stating that if this key isn't down go back to the standing frame
farvan is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Button State Bug dratl ActionScript 2.0 3 09-10-2007 04:07 AM
Flash button To Control Another button Crosz ActionScript 2.0 3 12-09-2006 02:10 AM
cool dropdown button spinsykel Other Flash General Questions 0 06-25-2005 12:50 AM
Movieclip plays - despite condition! visualizer29 ActionScript 1.0 (and below) 2 06-17-2004 05:29 PM
_mc button strange behavior after click action on component 303 maddec ActionScript 2.0 2 06-08-2004 02:25 AM

All times are GMT. The time now is 02:33 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.