| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Addicted To FLASH
|
Hi Jesse and all
I'm about to make that snake game (this one whoch comes with the NOKIA mobile sets) and I have a problem with moving it with arrows. I just donno how to give it (the snake) this motion when I press the arrow to left or to right or...., sure I can't set it with the rotation, any idea pals .....????
__________________
â€* GOD Is Near â€* Questions Don't PM for Questions An eye for an eye, make the whole world blind _____________________________________________GHANDI |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
I made a copy od this game a whiel back just to see how hard it would be and was surprised (as it was easier than I'd expected). I approached it by creating a 2D array and using two variables to define the movement. If the user presses up, then the y variable states that the next move should be negative in the y axis, and the x variable is zero, as you can only move vertically or horizontally in the traditional game. Movement was achieve by simple set property and the array was updated according to which direction the user had pressed. that way they can just press (don't have to hold) the directional control, just like on the the phones.
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
|
|
#3 |
|
Addicted To FLASH
|
Thanks for that fast reply, but can u post the game here. I'm just starting my array studying here and trying ti figure it all out.
Thanks again
__________________
â€* GOD Is Near â€* Questions Don't PM for Questions An eye for an eye, make the whole world blind _____________________________________________GHANDI |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
Sorry but not all my source is open to the public. Some's comercial.
Flashkit.com might have an example in the movies section.
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Card Match Game, Colour Me In Pictures and Board Game | Total Frigging | ActionScript 2.0 | 4 | 02-21-2005 01:04 AM |
| word search game with AS2 | black | General Chat | 5 | 08-12-2004 10:44 AM |
| [AS2] Tile game or not tile game? | krolben | Gaming and Game Development | 4 | 07-28-2004 01:41 PM |
| Game - freelancer required | fatherb | Projects and Positions | 6 | 07-18-2003 12:47 PM |