PDA

View Full Version : Basic Game


bobaloo1349
06-27-2007, 07:37 PM
I found some AS for a match game that was coded in AS1(i using flash8) that would work for the game that I am making. Atleast I thought, I am fairly new to AS and it doesnt work. The buttons are suppose to load randomly in a two columns of 8 buttons but they don't. This is maddening to me because I don't really like this game concept, but what can you do, I don't pay the bills.

Here is the premise of the game:

A) hit start

B) time counts up from 0 to 5min(or whenever I say)

C) pick 1 from left columns of buttons first (randomly displayed mc instances w/ buttons in them)
• release state should display an image of a home in a central position, under the "match graphic" on the main timeline

D) then pick 1 from the right column, which should be evaluated to see if its a match (randomly displayed mc's like left column)
• release state should display an image of a price in a central position,
over the "match graphic" on the main timeline

E) object of game is to match the pieces in the fasted time or before time runs out.


I have this game setup without any identifiers like the example but it doesnt load the MC's instances(with the butttons in them). If I give the the two different MC's (homes & prices) identifiers then it gives me a warning because there is multiple instances of that mc on the stage and it does something funky like not loading all 8 instances, it only loads 7.

Can someone look at my file and help me figure out whats wrong, please. I have been trying to figure this out for a little bit now, and i am not getting anywhere fast. I took the first frame out, so this is after you hit start(where all the code is.)

bobaloo1349
07-06-2007, 04:30 PM
first of all, this is done in flash 6.

I could really use some help with this, good news, I figured out most of the problems and found new ones.

The game works like it should (the timer is not added yet), but everything loads as it shoulds the first time thru the game.

The NEW problem is if you hit start(button) to go back to the first frame to play it again the buttons instances that load, via an array, are in their last state (the matched state). Now I think if I ad timer in it would continued from the time it left off from the first game also.

I have tried:
//RandomList is the array in which i load all the button instances randomly

clear(RandomList);

delete RandomList;

Does anyone know how to restart with a fresh cache and/or reload an array?