|
|
|
#1 |
|
Junior Member
Join Date: Aug 2001
Posts: 5
|
Greetings oh wise ones.
I'm tring to move an image across the screen. What I want to do is whenever a button on the keyboard is pressed the figure moves a bit so the more you tap like crazy (track and field or mortal kombat stylee) the faster said image gets to the other side. Any clues any ideas anything at all basically that the flash massive think might help would be lovely, cheers. ellopeeps. (AKA Mark) |
|
|
|
|
|
#2 | |
|
Super Moderator
Join Date: Aug 2000
Location: Montréal
Posts: 13,430
|
Quote:
on (release) { _root.fig._x +=10;} This will make the instance 'fig' move 10 pixels to the right gparis |
|
|
|
|
|
|
#3 |
|
Bamboozled
Join Date: Apr 2001
Posts: 1,278
|
furthermore for key pressing youll have to do this
on (keyPress "q") { _root.fig._x += 10; } on (keyPress "w") { _root.fig._x += 10; } on (keyPress "e") { _root.fig._x += 10; } on (keyPress "r") { _root.fig._x += 10; } on (keyPress "t") { _root.fig._x += 10; } on (keyPress "y") { _root.fig._x += 10; } and keep copying and pasting the code and replacing it with all the button on the keyboard unless someone knows a code to include all butons in one
|
|
|
|
|
|
#4 |
|
Super Moderator
Join Date: Aug 2000
Location: Montréal
Posts: 13,430
|
onClipEvent (keyDown) {
_root.fig._x +=10;} I didn't see the key press that'll do the job for any key!gparis |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Aug 2001
Posts: 5
|
Bang on,
cheers snoop. Any word on how to use any key as many times as they want so they can just start hitting keys. peeps. |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Aug 2001
Posts: 9
|
thats cool for your help people (im on this project with 'ellopeeps')
the whole game is gonna be 'snail racing'! So we now know how to move a specified character across using the keys... but what we need to create is a 'finish' line so that when an MC crosses that point it is declared the winner! AND we also need to know how to create 3 other random 'snail racers' that participate in the race, but i dont want them to finish in the same place everytime, so how would i do this also! all your help is very much appreciated! Gav + Dave Christon Davies Web Team |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Feb 2001
Posts: 1,835
|
Hi,
yes - just like gparis said, you can use onClipEvent(keyDown) - this will trigger when any key is pressed. - n. |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|