okay, so ive been using flash 8 for a few months and have only done animations, nothin with actionscript(know c++ but that didnt help), so this is a really easy problem i bet.
i have a character mc, let’s just call him ‘Jo’. in frame 1 of ‘Jo’ i have an mc(‘bounce’) and in frame 2 i have a different mc(‘rightUp’). i want ‘bounce’ to play when nothing relevant is pressed(or no key is pressed) and ‘rightUp’ to play all the way thru once(6 frames)when the UP key is held and the ‘S’ key is hit(note that the clip shouldnt play again unless ‘S’ is released and hit again, you can however hold ‘UP’). right now i have a simple actionscript that will play ‘bounce’ when nothin is going on, and when ‘S’ is hit it plays ‘rightUp’ as long as the key is down. i understand why this happens but i can’t figure out how to make it like i described.
here’s what i have but its really not what i want at all:
onClipEvent(enterFrame){
if (Key.isDown(83)){ //key code for ‘s’
stop();
this.gotoAndStop(2);}//goes to the ‘rightUp’
else{
this.gotoAndStop(1);//otherwise plays *‘bounce’ *which is what i want
}}
thanks in advance for any replies
EDIT: heres an example i made to show the problem, the real one doesnt fit. remember, i want the ‘bounce’ to play except when UP is HELD and S is PRESSED, and i want the ‘rightUP’ to play all the way thru once without being interupted by hitting it again.