To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 08-28-2001, 12:56 PM   #1
ellopeeps
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)
ellopeeps is offline   Reply With Quote
Old 08-28-2001, 01:29 PM   #2
gparis
Super Moderator
 
Join Date: Aug 2000
Location: Montréal
Posts: 13,430
Quote:
What I want to do is whenever a button on the keyboard is pressed the figure moves a bit
So i guess you need to put the 'figure' in a movieclip , give an instance to the clip , for example 'fig' and put that code in your buttons:
on (release) {
_root.fig._x +=10;}
This will make the instance 'fig' move 10 pixels to the right
gparis
gparis is offline   Reply With Quote
Old 08-28-2001, 02:18 PM   #3
snoop_doug
Bamboozled
 
snoop_doug's Avatar
 
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
snoop_doug is offline   Reply With Quote
Old 08-28-2001, 02:28 PM   #4
gparis
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
gparis is offline   Reply With Quote
Old 08-29-2001, 04:48 AM   #5
ellopeeps
Junior Member
 
Join Date: Aug 2001
Posts: 5
Smile Nice, but....

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.
ellopeeps is offline   Reply With Quote
Old 08-29-2001, 05:02 AM   #6
phukkin_username
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
phukkin_username is offline   Reply With Quote
Old 08-29-2001, 05:33 AM   #7
enemem
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.
enemem is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


All times are GMT -4. The time now is 04:30 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.