Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Games

Categories The basics of an RPG (role-playing game)
Author: denacioust | Website: flashbox.proboards15.com |

 
Page 3
«prev 1 2 3 4 5 6 next»

By declaring it as a function it can be used again with a randomising button. Draw a “roll again” button. Give it actions.

on (release) { randomise(); }

That will randomise the values by the click of that button. Place another button on the stage with the writing “Go” or “Play” or something to that extent in it. Give the button actions

on (release) {
 gotoAndStop("Game", 1);
}

And for the actual game…

Go to your “Game” scene and place in your character and the background. Select align (ctrl + k ) and centre your character on stage. Give the background the following actions.

onClipEvent (load) {
movespeed = 2;
}
onClipEvent (enterFrame) {
 if (Key.isDown(Key.RIGHT)) {
 _x-= movespeed;
 }
 if (Key.isDown(Key.LEFT)) {
 _x+= movespeed;
 }
 if (Key.isDown(Key.UP)) {
 _y+= movespeed;
 }
 if (Key.isDown(Key.DOWN)) {
 _y-= movespeed;
 }
 }

«prev 1 2 3 4 5 6 next»

» Level Intermediate

Added: : 2004-06-04
Rating: 6.63 Votes: 25
Hits: 1561
» Author
Flash meister
» Download
Download the files used in this tutorial.
Download (0 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 


The Network for Technology Professionals

Search:

About Internet.com

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