Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-16-2001, 11:11 AM   #1
rabsterb
Registered User
 
Join Date: Feb 2001
Posts: 41
Default need advise on flash 'game'

hi,
i've made a small actionscripted piece:
take a look at http://www.flash-i.com/actionscripted ...
continue to click until you get to 'colour' written in
blocks.

i don't know if this is possible or not but here's what i want to do.

all those little squares are basically a duplicate movie effect of a single square.

1) when you start the blocks on the csreen are all dark blue, but if you continue to rollover them, the eventually turn lgiht blue. Is there a way to detect when all of them are light blue, and direct to another page/display a message.

2) the next thing i'd like to do, is put in some sort of timing device that gives about 1 min to change colour of all the blocks, and if not goes to a 'game over' screen.

let me know if anyone knows how to do this,

kind regards,
jeev@flash-i.com
rabsterb is offline   Reply With Quote
Old 05-17-2001, 09:18 PM   #2
Marx
New Member
 
Join Date: Feb 2001
Posts: 378
Default

Hi..
Yes it is possible. Following is one example of how to accomplish it. The movie contains two textfields and two MC's, the first MC is a timer MC and contains a button and actionscripts, the second is the dup MC :

1) Place two dynamic textfields on your stage, name them 'gameTime' & 'message'.

2) Build the timer MC. Insert/New Symbol/Movie.

3) Add the following code:

a) Frame1:

stop ();

b) Frame2:

startTime = getTimer ();

c) Frame3:

timeNow = getTimer ();
minute = 60000;
timeDiff = timeNow-startTime;
if (timeDiff>=minute) {
_root.gameTime="Game Over!";
}

This sets the time for the game to one minute.

d) Frame4:

gotoAndPlay (3);

4) Now for the MC that will be duplicated. Insert/New Symbol/Movie.:

a) Frame1: Add a stop action and place the dark blue square graphic here.
b) Convert the dark blue square into a button symbol, then add this script:

on (rollOver) {
_root.count+=1;
gotoAndStop (2);
}

This action will , on roll over, turn the square to light blue and add one to the variable count. I originally thought of doing the color change using the color object but this seemed to suffice.

c) Frame2: Add a stop action and place the light blue square graphic here.

5) On your main stage, drag both MC's from the library, name your square MC 'square'.

6) Add the code that checks to see if all the dup's have been rolled over to either of the MC's:

onClipEvent (enterFrame) {
if (_root.count==10) {
_root.message="You win, all ten are now blue!";
}
}

There you have. Sorry to prattle on so much.

Good luck.

PS: Heres the duplication code I used for testing purposes. Placed on frame 1:

xpos = 20;
xspace = 50;
i = 1;
while (i<10) {
_root.square.duplicateMovieClip("newMc"+i, i);
_root["newMc"+i]._x = xpos;
xpos += xspace;
i++;
}
Marx is offline   Reply With Quote
Old 05-18-2001, 04:52 AM   #3
rabsterb
Registered User
 
Join Date: Feb 2001
Posts: 41
Default wow

thankyou so so much for the longg reply.

i'll definintely try it out, and post up what i come up with

kind regards,
jeev
rabsterb is offline   Reply With Quote
Old 05-18-2001, 05:08 AM   #4
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

Marx wins a golden smile for such a long post

Cheers

Jesse
__________________
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.
Jesse is offline   Reply With Quote
Old 05-20-2001, 12:07 PM   #5
rabsterb
Registered User
 
Join Date: Feb 2001
Posts: 41
Default

hi, i'm making this game which you can see at:
http://www.flash-i.com/hidden/plat2.html

what i want is to make a 'high scores' table - anyone know how i can do this. I've seen a coupl e done with cgi, but they look quite difficult to use. are there any without cgi?

comments about the game are most welcome :)

kind regards,
jeev
rabsterb is offline   Reply With Quote
Old 05-21-2001, 04:47 AM   #6
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

I like the game. It's in the typical style but good. High scores can be saved using a server-side script and a text file. It's that simple. You can write to a text file all the scores people get and then load it up at the start of each game play. If a score in the list is less than the score that player just got, throw it out.... do a search for "write text file php" on these forums.. there are plenty of threads discussing the method.

Cheers

Jesse
__________________
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.
Jesse is offline   Reply With Quote
Old 05-24-2001, 12:29 PM   #7
rabsterb
Registered User
 
Join Date: Feb 2001
Posts: 41
Default

hi,
following my first game which you can see at http://www.flash-i.com/supersheep.html - i now trying to take on something alittle more difficult, and i was wondering if anyone here could help me out.


basically, what i want to do is make a platform style game.
how i hope to achieve this is throught, when eg. user goes right, the background (ie. levels/plateforms + scenery) scroll past, giving the illusion that the player is moving along. What kind of code would i need to achieve this?

next thing i need to know is how to get muliple levels into a game. By levels i mean, e.g. there's the gournd, but maybe i want the player to be able to jump onto the top of a building or something... so i'd need to know a gravity script + a on hit collision detect.

last question (sorry for going on a bit
how can i achieve the effect that when the player is not moving - the characters feet remain still and do nothing, but when the eg. right arrow/left arrow is pressed, then the feet move, to simultae the effect that he is waking along?

any advice would be most appreciated


kind regards,
jeev
rabsterb is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
one template, many looks? subquark ActionScript 1.0 (and below) 1161 09-03-2009 04:45 PM
scrollBar on Flash Exchange cdeg Components 5 05-03-2004 08:13 PM
Best Flash MX and 2004 Game Online books? obsoleteasian Gaming and Game Development 3 12-05-2003 04:28 AM
save game in flash projector hsing Gaming and Game Development 12 04-30-2003 11:36 PM
Any Flash Game Devs around? Goosey Gaming and Game Development 2 03-06-2003 07:57 AM


All times are GMT. The time now is 01:30 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.