-
press a button on flash with space bar
can someone please tell me how to make it so when you press the space bar itll go to another frame?
o yeh, im using macromedia flash mx 2004
i dunno what to put here so i wont put anything :P
-
on(keyPress "<Space>"){
nextFrame;
}
-
nope thats doesnt work
no, it doesnt work it comes up with error
here is what it says:
**Error** Scene=Scene 1, layer=Layer 1, frame=2:Line 1: Key code identifier expected
on(keyPress <Space> ){
Total ActionScript Errors: 1 Reported Errors: 1
i dunno what to put here so i wont put anything :P
-
I edited the code... check it out now.
You needed " " 's around the <Space> making "<Space>"
-
um, it doesnt say error, but when i press space bar it doesnt do anything
i dunno what to put here so i wont put anything :P
-
I've never done anything like this, but lets hope it'll work.
Try this code:
PHP Code:
frame = 0;
on(keyPress "<Space>"){
frame += 1;
gotoAndStop(frame);
}
Try that code twice, first time copy and paste, second time replace gotoAndStop(frame); with gotoAndStop("frame");
-
o brilliant
yeh thats works thanx a lot
i dunno what to put here so i wont put anything :P
-
No problem, I thought you just wanted it to go to and stop on the next frame, that's far more complicated than gotoAndPlay.
Good luck with your project
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|